Skip to content

feat: split out docs/guidelines routes from shared MdxRoute file#1224

Draft
jderochervlk wants to merge 2 commits intovlk/split-out-docs-reactfrom
vlk/split-out-docs-guidelines
Draft

feat: split out docs/guidelines routes from shared MdxRoute file#1224
jderochervlk wants to merge 2 commits intovlk/split-out-docs-reactfrom
vlk/split-out-docs-guidelines

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

This pull request adds support for a new "docs/guidelines" section to the documentation site. It introduces a dedicated route and loader for guideline pages, ensures proper routing and filtering, and updates the layout to match other documentation sections.

Routing and page loading:

  • Added a new route handler DocsGuidelinesRoute with a corresponding loader to render markdown files from markdown-pages/docs/guidelines, extract metadata, build a table of contents, and set up the page layout. (app/routes/DocsGuidelinesRoute.res, app/routes/DocsGuidelinesRoute.resi) [1] [2]
  • Updated the main routes configuration to scan and include all guideline markdown files as routes, similar to how manual and react docs are handled. (app/routes.res) [1] [2]

Routing logic and filtering:

  • Modified the MDX routes filter to exclude "docs/guidelines" paths from generic MDX handling, ensuring they are handled by the new dedicated route. (app/routes.res)
  • Updated the fallback logic in MdxRoute to properly handle "docs/guidelines" paths, so they render with the correct layout when matched. (app/routes/MdxRoute.res)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Cloudflare deployment

Deployement ID: d1a22796-3c13-42a8-8ce3-4b2f227a7ab2
Deployment Environment: preview

⛅️ wrangler 4.63.0 (update available 4.80.0)
─────────────────────────────────────────────
✨ Compiled Worker successfully
Uploading... (7188/7659)
Uploading... (7345/7659)
Uploading... (7502/7659)
Uploading... (7659/7659)
✨ Success! Uploaded 471 files (7188 already uploaded) (4.08 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://d1a22796.rescript-lang.pages.dev
✨ Deployment alias URL: https://vlk-split-out-docs-guideline.rescript-lang.pages.dev

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