sphinx-doc / sphinx-doc/sphinx

Improve support for pages without sections (titles)

Open
#8,356 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.
Pages that don't have any section seems to be hard to work with. Also, their HTML <title> looks odd (in the browser tabs for example). Currently, a page that doesn't have any section (with for example html_title set to 'test') will render <no title> — test.

Also it seems like the document can't be included in any toctree, even explicitly (using Title <test_doc>).

Describe the solution you'd like

  • Ability to remove the <no title> — part so my page title is equal to html_title (for example in conf.py).
  • Allow to explicitly reference documents that have no sections in a toctree.

Describe alternatives you've considered
I've tried patching it manually, without great success.

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

Reproduce the case with a page that has no sections, html_title set to "test", and an explicit toctree entry such as "Title <test_doc>". Trace how the page title and toctree inclusion are handled; done means the HTML title omits the " —" prefix and the document can be referenced explicitly.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.