sphinx-doc/sphinx

DRY: refactor common functionality in generating index nodes

Open

#2914 aperta il 26 ago 2016

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Python (1985 fork)batch import
good first issuehelp wantedtype:enhancement

Metriche repository

Star
 (5625 star)
Metriche merge PR
 (Merge medio 10g 11h) (11 PR mergiate in 30 g)

Descrizione

I am trying to write a simple extension to automatically add some index nodes. Unfortunately there doesn't seem to be any base function to do that. I found three places where the same essential stuff is being used to add index nodes to the toctree:

So it looks like I have to copy the appropriate implementation pieces of this (add a target node, add an index node, configure each of them).

It would be really useful to refactor the common functionality into a single, simple function that extensions could use.

Guida contributor