Add static site generation for GitHub Pages deployment - #1
Merged
Conversation
The app renders pages server-side (Express + EJS) purely as a function of (route, language), with no per-request dynamic data, so each page can be pre-rendered once at build time. static-export.js boots the real server, crawls every route the controllers declare (in all their supported languages), and writes the responses alongside a full copy of the built os-app asset tree, producing a self-contained static site for GitHub Pages. Also: - fix static.yml's push trigger, which targeted "master" while the repo's default branch is "main", so it never actually ran - build the app and run the export before uploading the Pages artifact, instead of uploading raw repo source - pin magic-string to a CommonJS-compatible version via "overrides"; the unpinned latest is ESM-only and breaks OLSKRollupPluginLocalize, which "require()"s it directly
michielbdejong
pushed a commit
that referenced
this pull request
Jul 24, 2026
…c export - set NODE_ENV=production when booting the server for crawling, so the dev-only livereload script (injected by OLSKExpress whenever NODE_ENV !== production) doesn't get baked into the static pages and trip mixed-content blocking once served over HTTPS - write an empty .nojekyll to the export root; GitHub Pages otherwise treats underscore-prefixed folders (_shared, __compiled) as Jekyll-reserved and silently excludes them, 404ing every asset under them despite the generated HTML referencing the correct paths Found by testing the live deploy from #1 at hyperdraft.pondersource.com.
4 tasks
michielbdejong
added a commit
that referenced
this pull request
Jul 24, 2026
…c export (#6) - set NODE_ENV=production when booting the server for crawling, so the dev-only livereload script (injected by OLSKExpress whenever NODE_ENV !== production) doesn't get baked into the static pages and trip mixed-content blocking once served over HTTPS - write an empty .nojekyll to the export root; GitHub Pages otherwise treats underscore-prefixed folders (_shared, __compiled) as Jekyll-reserved and silently excludes them, 404ing every asset under them despite the generated HTML referencing the correct paths Found by testing the live deploy from #1 at hyperdraft.pondersource.com. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds static site generation capabilities to enable deploying the application as a static site to GitHub Pages. A new Node.js script crawls all public routes and renders them to static HTML files, which are then deployed instead of the raw repository.
Key Changes
New
static-export.jsscript: Implements a complete static site generation pipeline that:os-appdirectory.static/directory with proper directory structureUpdated GitHub Actions workflow (
static.yml):mastertomain'.') to only the generated.staticdirectoryUpdated
package.json:static-exportnpm script that runs the new static generation scriptmagic-stringversion override to resolve dependency conflictsImplementation Details
/about→.static/about/index.html)https://claude.ai/code/session_01AcjKc8vk2fb84yYZsE8k5d