teemtee / fmf

Flexible Metadata Format
GNU General Public License v2.0
22 stars 28 forks source link

Use `sphinx.ext.autosectionlabel` #257

Open LecrisUT opened 1 week ago

LecrisUT commented 1 week ago

I was trying to link to the hierarchy section using intersphinx links, but I couldn't find the target for it similar to how select is available. This is mostly because the sections are not auto-labeled. This should make linking easier for external documentations.

Not sure if autosectionlabel_prefix_document would also be necessary.

Trying to debug using:

$ myst-inv https://fmf--257.org.readthedocs.build/en/257/
fails
$ python -m sphinx.ext.intersphinx https://fmf--257.org.readthedocs.build/en/257/objects.inv
works

Edit: This does resolve my issue, the only question is if autosectionlabel_prefix_document should be used. I don't know what it does when there are label clashes, but to me it seems prudent to add it

std:label
    hierarchy                                Hierarchy                               : features.html#hierarchy

vs

std:label
    features:hierarchy                       Hierarchy                               : features.html#hierarchy