Links and Navigation
Methanol uses file-based routing. Link to pages using their route paths.
Internal Links
Use site routes (no file extension):
[Writing basics](./writing)
Renders as: Writing basics
If you move or rename a page, update the route in your links.
Subpath Deployments (site.base)
If your site is served under a subpath (for example https://example.com/docs/), set site.base: '/docs/' and avoid root-absolute internal links like /blog/post in your content.
Prefer relative links:
[Next post](./next-post)
[Back to blog](../blog/)
If you need to generate a root-absolute link in MDX/JSX, wrap it with ctx.withBase:
<a href={ctx.withBase('/blog/post')}>Read</a>
External Links
Use full URLs for external sites:
[Example](https://example.com)
Renders as: Example
Navigation Order
Use frontmatter fields to control order and visibility:
weight: lower numbers come firsthidden: hide from the sidebarisRoot: use on anindex.mdxto define a navigation root
Full details are in the Frontmatter reference.