mystmd
mystmd copied to clipboard
📖 Add Index support to MyST
trafficstars
This addresses https://github.com/jupyter-book/mystmd/issues/190
It replicates the Sphinx functionality described here: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#index-generating-markup
There is an index role, index directive, and genindex directive to locate the index. (This last feature is slightly different from Sphinx where genindex is a "magic" toc entry; as a directive, genindex follows existing MyST patterns better.)
For the web build, we use a definitionList to make an index that looks something like:
The index functionality was also hooked into latex export using the imakeidx package: