Page Ordering

Methanol automatically builds site navigation based on your pages/ directory structure. Within each directory, items are sorted according to the following algorithm:

  1. / (The site root index) always takes precedence.
  2. index.mdx is positioned before other pages within the same folder. Its Frontmatter also defines the folder's display label and display order.
  3. weight: Items are sorted in ascending order (smaller values appear first). Unweighted items are placed after weighted items.
  4. date: Items are sorted in descending order (most recent first) when weights are identical. Items without a date are placed after dated items.
  5. Finally, remaining items are sorted alphabetically by title (or filename/directory name).

Best Practices

Configuration Example

---
title: Guides
weight: 10
---

# aaa
[bbb](233)

See also: Frontmatter Reference