Page Ordering
Methanol automatically builds site navigation based on your pages/ directory structure. Within each directory, items are sorted according to the following algorithm:
/(The site root index) always takes precedence.index.mdxis positioned before other pages within the same folder. Its Frontmatter also defines the folder's display label and display order.weight: Items are sorted in ascending order (smaller values appear first). Unweighted items are placed after weighted items.date: Items are sorted in descending order (most recent first) when weights are identical. Items without a date are placed after dated items.- Finally, remaining items are sorted alphabetically by
title(or filename/directory name).
Best Practices
- For directories, define ordering and labeling metadata in the directory's
index.mdxfile. - Use
weightfor permanent, stable navigation structures anddatefor time-sensitive lists. - Files or directories prefixed with
_or.are automatically excluded from the navigation tree.
Configuration Example
---
title: Guides
weight: 10
---
# aaa
[bbb](233)
See also: Frontmatter Reference