Skip to content

fix: keep Archive script inside the HTML document - #1

Draft
y4ho0 wants to merge 1 commit into
mainfrom
codex/site-maintenance-archive-html
Draft

fix: keep Archive script inside the HTML document#1
y4ho0 wants to merge 1 commit into
mainfrom
codex/site-maintenance-archive-html

Conversation

@y4ho0

@y4ho0 y4ho0 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

What changed

  • Move the Archive filter script inside BaseLayout, so Astro emits it before </body> instead of after </html>.
  • Extend the distribution verifier to reject missing closing </html> tags and non-whitespace content after the closing document element.

Why

The browser recovered from the malformed output and the empty Archive page appeared functional, but the production build placed its page script after the closing </html> tag. This is invalid document structure and was not covered by the existing output checks.

Impact

Archive behavior is unchanged. The generated page is now structurally valid, and future instances of trailing content after </html> will fail the build.

Validation

  • npm run check
  • npm test (10 passed)
  • npm run build
  • git diff --check
  • Tidy/HTML parser check confirms no content remains after </html>
  • Production preview of /archive/ renders without overflow or console errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant