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

Another take at a Tags domain #101

Open melissawm opened 2 months ago

melissawm commented 2 months ago

Here's an attempt at a domain approach - building on the idea by @story645. This is very similar to #92 but I am explicitly trying to do the bare minimum.

This works well to read and generate tags. The problem is:

Any tips are appreciated 🙏🏻

melissawm commented 2 months ago

Also: this actually works without the tags:tags problem so we can also try to join the best of both PRs if needed? 😄 I didn't want to do the Index part unless absolutely necessary because it sounds like it will include the tags in the global sphinx index and I'm not sure that gives us the flexibility to customize the index page? Maybe I'm wrong, I haven't tried very hard. Will come back to this in the next few days.

melissawm commented 2 months ago

Here's a pointer someone shared at the writethedocs slack: https://github.com/dernorberto/sphinxPageProperties/blob/main/extension/page_properties_report.py and also https://github.com/sphinx-doc/sphinx/issues/11562

melissawm commented 1 month ago

I think this is almost there. A couple of details left, as mentioned in the commit message:

This generates a couple of build warnings, because some references are missing on the first pass. This is expected, but we should either silence these errors or defer resolution of these references until later.

This also doesn't include badges for similar reasons: because the references in the badges can't be resolved in the first pass, the badges are not linked to any pages.

melissawm commented 1 month ago

Not sure why the docs build is failing on readthedocs as I don't see this failure locally. Will investigate later.