Skip to content

Section Index Plugin

Create index pages for documentation sections.

Core Attributes

Plugin Name

section-index

Installation

Bash
pip install mkdocs-section-index

Configuration

YAML
plugins:
  - section-index

What It Does

Section Index allows index.md files to represent entire sections in navigation, creating cleaner structure.

Without section-index:

Text Only
- User Guide
  - Overview
  - Installation
  - Configuration

With section-index:

Text Only
- User Guide  # <- This is clickable and shows index.md
  - Installation
  - Configuration

Usage

Basic Structure

Text Only
docs/
└── user-guide/
    ├── index.md       # Section overview
    ├── install.md
    └── config.md

The index.md becomes both: 1. The section landing page 2. The section item in navigation

Nested Sections

Text Only
docs/
└── guides/
    ├── index.md
    ├── beginner/
    │   ├── index.md
    │   └── basics.md
    └── advanced/
        ├── index.md
        └── expert.md

Each index.md serves as section overview.

Index Page Content

Create welcoming overview pages:

Markdown
# User Guide

Welcome to the comprehensive user guide.

## What You'll Learn

- [Installation](install.md) - Get up and running
- [Configuration](config.md) - Customize your setup
- [Advanced Topics](advanced.md) - Deep dive

## Prerequisites

Before starting, ensure you have:
- Python 3.8 or higher
- Basic command line knowledge

Benefits

Cleaner Navigation

Reduces navigation depth and redundancy

Better UX

Clickable section headers provide context

SEO Friendly

Landing pages for each topic area

Organization

Natural information hierarchy

Combined with Awesome Nav

These plugins work perfectly together:

YAML
plugins:
  - awesome-nav
  - section-index

Awesome Nav generates structure, Section Index makes it clickable.

Best Practices

  1. Every folder should have index.md
  2. Index pages provide section overview
  3. Link to sub-pages from index
  4. Use descriptive section names
  5. Keep hierarchy shallow