Quick Reference
Create the content file
Add a new
.md or .mdx file in apps/site/pages/en/ under the appropriate subdirectory.Choose a layout
Set the
layout frontmatter field to one of the available layouts in apps/site/layouts/.Update navigation (if needed)
If the page should appear in the sidebar, update
apps/site/navigation.json.1. Create the Content File
Create a new Markdown file inapps/site/pages/en/ with the appropriate subdirectory structure.
Learn Page Structure
Learn pages follow a category/article hierarchy:2. Configure the Frontmatter
The YAML frontmatter at the top of the file controls page metadata:| Field | Required | Description |
|---|---|---|
title | Yes | Browser tab title and SEO <title> tag |
layout | Yes | Layout template name (see available layouts below) |
description | No | SEO meta description |
authors | No | GitHub usernames for learn articles; shown in the meta bar |
canonical | No | Original URL for syndicated content |
3. Choose the Appropriate Layout
Available layouts are defined inapps/site/layouts/ and mapped in apps/site/components/withLayout.tsx.
| Layout name | File | Best for |
|---|---|---|
about | About.tsx | About section pages with sidebar navigation |
article-page | ArticlePage.tsx | Standalone article pages with meta bar |
blog | Blog.tsx | Blog index and category listing pages |
default | Default.tsx | Generic pages with no sidebar |
download | Download.tsx | Download pages with release data integration |
download-archive | DownloadArchive.tsx | Download archive listing |
glowing-backdrop | GlowingBackdrop.tsx | Landing/feature pages with visual treatment |
learn | Learn.tsx | Learn section articles with sidebar and cross-links |
post | Post.tsx | Individual blog posts with author and category |
4. Update Navigation
Top Navigation
ThetopNavigation key in apps/site/navigation.json controls the main navbar links:
Side Navigation (Learn)
To add a Learn article to the sidebar, add an entry to thesideNavigation.learn.items object in navigation.json:
Add Translation Keys
Navigation labels are translation keys, not raw strings. Add the corresponding key/value pair topackages/i18n/locales/en.json:
Only add new translation keys to
packages/i18n/locales/en.json. Crowdin automatically syncs new keys to translators. New keys should be added at the bottom of the file so translators can spot them easily.Page Type Examples
- Standard Content Page
- Blog Post
- Learn Article
Validation and Testing
Before opening a pull request:- Preview locally: Run
pnpm devand navigate to your page - Check formatting: Run
pnpm formatto ensure consistent formatting - Validate links: Confirm all internal links resolve correctly
- Test responsiveness: Check the layout on different screen sizes
Dynamic Content Pages
For pages that need build-time data (e.g., release listings):- Add a data provider in
apps/site/next-data/ - Configure the data source in the appropriate script
- Access data through layout props or React context
apps/site/next-data/providers/releaseData.ts for a real example used by the Download layout.