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: tag formatters #61

Open story645 opened 1 year ago

story645 commented 1 year ago

Is it possible to provide a way to configure how tags are rendered in the badge separate from how they're defined in text. For example in-text tagging may include hierarchy ..tags:: domain:geometry but we'd like the rendered tag to display just geometry because we can show the hierarchy in a different manner. I'm thinking something like a callable: Tag.set_formatter(lambda: x: x[:10])

attn: @esibinga