Domain index entries could be generated later in the build process
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system
Research direction
Read the Builder.build flow, especially Builder.prepare_writing, Builder.finish, Builder.gen_indices, Builder.write_domain_indices, and Index.generate. Confirm how HTML-based builders currently use domain index class attributes, then defer generation until domain indices are written while preserving existing output and behavior.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Domain index entries could be generated later in the build process.
Describe the solution you'd like
Domain indices, at least in HTML-based builders, are written during Builder.finish but generated during Builder.prepare_writing. In other words
# Abstract builder when applicable, else HTML builder
Builder.build()
├── ...
├── Builder.write()
│ └── Builder.prepare_writing()
│ └── Index.generate() # Here domain index entries are generated.
└── Builder.finish()
└── Builder.gen_indices()
└── Builder.write_domain_indices() # Here domain index entries are used.
During prepare_writing, some class attributes from each domain Index are used, but not the generated content. In other words, from what I have seen, the generated index entries could be generated (Index.generate()) directly during Builder.write_domain_indices()). In my opinion, it would make perfect sense to wait until the generated domain index entries are needed before generating them.
Also, this enable domains to provide a wider variety of features along with their Index.
Describe alternatives you've considered
- https://github.com/sphinx-doc/sphinx/issues/10295
- Adding a finish task, but there is no API for this. I would need to implement a custom builder.
Additional context
Add any other context or screenshots about the feature request here.
In case you would consider this acceptable, I would probably write a patch since the required changes in the code seams quite minor and safe at first sight
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sphinx-doc/sphinx
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sphinx-doc/sphinx#14699 ·
-
type:bug type:tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sphinx-doc/sphinx#14678 ·
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
sphinx-doc/sphinx#14659 ·
-
autodoc: IndexError formatting signature for callable data object with annotated class variable Openextensions:autodoc type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
sphinx-doc/sphinx#14576 · 2 comments ·
-
extensions:autodoc extensions:autosummary type:bug type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sphinx-doc/sphinx#14555 · 2 comments ·
All issues in sphinx-doc/sphinx
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100