Hello there!
I could use some help for an extension based on the
Recipe tutorial.
In my ingredients index, I would like them to be grouped by first
letter and display links to each usage of the ingredient, just like the
default General Index.
For example, if I used
"flour" in four recipes and rendered the index (use ReadTheDocs theme), I
would like to get the following result:
(in order to make this mockup screenshot this, I simply used the :index:`flour` role four times in my documents.)
The RecipeIndex provides recipes grouped by their first letter by returning and a list of index entry tuples per first letter:
content[ingredient].append(
(dispname, 0, docname, anchor, docname, '', typ)
)
Here, content is a mapping of first letters to index entries, like sphinx.domain.IndexEntry instances.
In
the search for my solution, I looked for how the general index was
built and discovered that domain indices and the general index was two
completely different beasts.
It seams to me that I'd like to
use capabilities of both index implementations but they have pretty
much nothing in common. Has anybody did this in the past? An hybrid of
the general index and a domain index? And, does anybody knows if there
is a longterm intention of merging the two index workflows?