Skip to content

Use main landmark for page content#181

Merged
mwest1066 merged 2 commits into
mainfrom
codex/pandoc-terms-main-content
Jul 2, 2026
Merged

Use main landmark for page content#181
mwest1066 merged 2 commits into
mainfrom
codex/pandoc-terms-main-content

Conversation

@mwest1066

Copy link
Copy Markdown
Member

Description

Wrap the routed page content in src/pages/_app.tsx with a semantic <main> element while leaving the shared header and footer outside of it.

This makes the deployed legal pages work better as canonical document sources for tools like Pandoc. Pandoc imports the <main> content as the document body, so running pandoc https://www.prairielearn.com/legal/terms -f html -o terms.docx no longer includes the site navigation text before the Terms of Service content.

AI assistance: majority of implementation and validation.

Testing

  • pnpm lint
  • pnpm build
  • Started the production build locally with pnpm start -p 30281 and verified curl -s http://localhost:30281/legal/terms | pandoc -f html -t plain starts at Terms of Service without Free sign up, Login, or navigation text.
  • Generated /tmp/terms-after.docx with pandoc http://localhost:30281/legal/terms -f html -o /tmp/terms-after.docx and verified the DOCX text starts at Terms of Service.

The first build attempt failed because the PrairieLearn submodule was uninitialized in this worktree. After git submodule update --init PrairieLearn, the build passed.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marketing Ready Ready Preview, Comment Jul 2, 2026 8:42pm

Request Review

@mwest1066 mwest1066 marked this pull request as ready for review July 2, 2026 20:44
@mwest1066 mwest1066 merged commit 57e3235 into main Jul 2, 2026
3 checks passed
@mwest1066 mwest1066 deleted the codex/pandoc-terms-main-content branch July 2, 2026 20:45
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.

2 participants