Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another take at a Tags domain #101

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Another take at a Tags domain #101

wants to merge 5 commits into from

Conversation

melissawm
Copy link
Owner

@melissawm melissawm commented Jun 29, 2024

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:

  • To create the pages for each tag and the tags index, all files must be read first
  • Sphinx complains about not finding the pending references (for example, we link to _tagindex from a toctree, but this file hasn't been created yet before all files are read and tags are parsed)
  • Once files are read, I can't find a way to add the new files to the source tree so they are included in the build.

Any tips are appreciated 🙏🏻

@melissawm
Copy link
Owner Author

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
Copy link
Owner Author

melissawm commented Jul 3, 2024

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

@melissawm melissawm mentioned this pull request Jul 6, 2024
melissawm and others added 5 commits July 14, 2024 12:43
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
Copy link
Owner Author

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
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant