__smm_static_temp_content__

Routing and Sidebar Patterns

index.md is landing page

Grouping directories with parentheses (groupers)

Directory names wrapped in () act as groupers:

Groupers are useful for visually grouping related pages without adding extra URL segments.

Example:

docs/
  (Guides)/
    setup.md
    usage.md

Routes:

Sidebar:

Guides          ← grouper label (not a link)
  Setup
  Usage

Grouper ordering and index collision rules

Numeric prefixes on groupers only control ordering among other groupers — they never collide with indexes on regular files or directories. This is because the sort algorithm always places groupers after every regular file and directory at the same level, regardless of what prefix you give them.

Similarly, numeric prefixes on regular files and directories only control ordering among their own kind.

In short:

Example:

docs/
  index.md
  1. Getting Started.md
  2. CLI Reference.md
  (1. Guide)/
    routing.md
  (2. Configuration)/
    smm-config.md
  (3. Examples)/
    structure.md

Sidebar order:

Home              ← index.md first
Getting Started
CLI Reference
Guide             ← grouper label (after all regular files)
  Routing
Configuration     ← next grouper
  SMM Config
Examples          ← last grouper
  Structure

Regular directories (without parentheses)

Example:

docs/
  guides/
    index.md
    setup.md

Routes:

Ordered filenames with index prefixes

If you use names like:

and set trimIndexFromPath: true in config, names can be ordered while emitted as clean paths.

The index prefix in filenames does not conflict with grouper indexes — they operate in separate sort tiers.

Directories vs groupers summary

Sidebar rendering In URL path Can have index.md
Regular directory Collapsible Yes Yes
Grouper (Name) Labeled section No No

Slug generation rules

Route path segments are normalized by the CLI: