MkDocs Section Index Plugin

0.3.11 · active · verified Sat Apr 11

mkdocs-section-index is an MkDocs plugin that enables sections in your navigation to be clickable, leading to an index page rather than just expanding. This addresses a limitation in standard MkDocs where sections are typically not directly navigable pages. It is currently at version 0.3.11 and frequently releases updates to maintain compatibility with new versions of MkDocs and popular themes like MkDocs Material.

Warnings

Install

Quickstart

To use mkdocs-section-index, first install it via pip. Then, enable it in your `mkdocs.yml` file under the `plugins` section. Define your navigation (`nav`) structure such that a markdown file (conventionally `index.md`) is specified as the first child of a section. This `index.md` file will then become the clickable index page for that section in the generated documentation.

# mkdocs.yml

site_name: My Project Docs

nav:
  - Home: index.md
  - Guides:
    - guides/index.md  # This page becomes the clickable 'Guides' section index
    - guides/setup.md
    - guides/usage.md
  - API Reference: api/index.md # Another way to define a section index

plugins:
  - search
  - section-index

# --- Expected file structure ---
# ./
# ├── mkdocs.yml
# └── docs/
#     ├── index.md
#     ├── guides/
#     │   ├── index.md
#     │   ├── setup.md
#     │   └── usage.md
#     └── api/
#         └── index.md

view raw JSON →