sphinx-doc / sphinx-doc/sphinx

Request: default document for subdirectories a la Apache DirectoryIndex

Open
#6,868 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

internals:toctree type:enhancement
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Instead of writing e.g.

.. toctree::
    :maxdepth: 3

    intro/index
    topics/index
    howto/index
    faq/index
    ref/index
    misc/index
    glossary
    releases/index
    internals/index

I would like to be able to omit /index. This would be similar to Apache's DirectoryIndex directive, in that <prefix>/index.html can be shortened to <prefix> for URLs.

I am not aware of any currently existing feature or extension that does this, hence this request. (If this has been discussed before here or on the mailing list, then please accept my apologies!).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/contents.txt and the toctree documentation to understand the requested omission of /index, then locate the code that resolves toctree entries. Done means directory-like entries resolve to their index documents without explicitly naming /index, while existing explicit paths continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.