melissawm / sphinx-tags

A tiny Sphinx extension that implements blog-style tags for documentation.
https://sphinx-tags.readthedocs.io/en/latest/
MIT License
44 stars 11 forks source link

ENH: tags list directive #64

Open story645 opened 11 months ago

story645 commented 11 months ago

Was talking to @esibinga about how sometimes you need a list of tags in the documentation example and also want a glossary example and thinking it might be nice to have a directive that's kinda a mix of the sphinx-gallery ..mini-gallery and matplotlibs ..math_symbol_table.

So for example. given tags: [a:1, a:2, a:3, b:1, b:2, b:3]

.. list-tags:: a:*
  :wrap: True

would print:

a:1, a:2, a:3, a:4

60 could be implemented as part of this, e.g.:

tags = {a:1: A, a:2:B, a:3:C, b:1:D, b:2:E, b:3:F]


.. list-tags:: b*
  :glossary: True
  :wrap: False

would yield:

tag meaning
b:1 D
b:2 E
b:3 F
melissawm commented 10 months ago

So essentially this would be a way to create tag subgroups, and then list those on demand.

story645 commented 10 months ago

I think the subgroups would also be semi on demand if it's by glob.like matching but yeah. The goal is more being able to keep tag listings in sync.