Fix mixed-content livereload leak and Jekyll asset exclusion in static export - #6
Merged
Merged
Conversation
…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.
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
Follow-up to #1, fixing two issues found by testing the live deploy at hyperdraft.pondersource.com:
NODE_ENV=production, so OLSKExpress's dev-only livereload script got baked into every static page and tried to load an insecurehttp://script once served over HTTPS._shared/...andopen-write/__compiled/...: GitHub Pages treats underscore-prefixed folders (_shared,__compiled) as Jekyll-reserved and silently excludes them from serving unless a.nojekyllmarker file exists at the artifact root. The generated HTML already referenced the correct absolute paths (verified locally) — the files just weren't being served.Changes
static-export.js: setNODE_ENV: 'production'on the spawned server processstatic-export.js: write an empty.nojekyllfile into the export output alongside the copiedos-appassetsTest plan
npm run static-export.static/.nojekyllexistslivereloadstring appears in any crawled pagehyperdraft.pondersource.com/en/write/loads without mixed-content warnings or 404shttps://claude.ai/code/session_01AcjKc8vk2fb84yYZsE8k5d
Generated by Claude Code