This is the PrairieLearn marketing website built with Next.js 16 and TypeScript. It showcases PrairieLearn's educational assessment platform features and hosts content from the PrairieLearn example course via a git submodule.
- NEVER amend commits or force push unless specifically requested.
- NEVER rebase unless specifically requested, always use merge commits.
- NEVER use
as anycasts in TypeScript code to avoid type errors. - Don't add extra defensive checks or try/catch blocks that are abnormal for that area of the codebase (especially if called by trusted / validated codepaths).
- Don't add extra comments that a human wouldn't add or that are inconsistent with the rest of the file.
- When opening a pull request, follow the template in
.github/PULL_REQUEST_TEMPLATE.md.
pnpm dev # Start development server on localhost:3000
pnpm build # Production build
pnpm lint # Run ESLint and Prettier checks
pnpm format # Auto-format with PrettierThe PrairieLearn/ directory is a git submodule containing the example course content:
git submodule init && git submodule update # Initial setup
git submodule update --remote # Update to latestThe site pulls content from PrairieLearn/exampleCourse/ and processes it for display:
- src/lib/catalog/ - Utilities that read markdown files from the submodule, parse frontmatter with
gray-matter, and expose content for pages - src/remarkPlugins/ - Custom Remark plugins for markdown processing (extractImages, loadCode, rewriteAssessmentLinks)
COURSE_ROOTinsrc/lib/catalog/util.tspoints toPrairieLearn/exampleCourse/
MDX support is configured in next.config.ts with:
- Math rendering via
remark-mathandrehype-katex - GitHub Flavored Markdown via
remark-gfm - Auto-linking headings via
rehype-slugandrehype-autolink-headings
- src/pages/ - Next.js page routes (catalog/, about/, products/, pricing/, etc.)
- src/components/ - Reusable React components with co-located
.module.scssfiles - src/lib/images/ - Static image assets
ExampleQuestion.tsx- Renders interactive PrairieLearn question examplesExampleEditor.tsx- Shows code editor examplesBlogMarkdownLayout.tsx- Layout wrapper for markdown content pages