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

Updating tags without cleaning may generate duplicate items in tag toctree #17

Closed
melissawm opened this issue Aug 22, 2022 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@melissawm
Copy link
Owner

Running sphinx without clearing the tags folder first may cause files to be added multiple times to the tag page toctree.

@melissawm melissawm added the bug Something isn't working label Aug 22, 2022
@nebelgrau77
Copy link
Contributor

Yes, it does happen e.g. when you edit your tags, because maybe you decided afterwards to have them start with a capital letter.

One idea that comes to mind is to have sphinx_tags clean the folder using os.remove(), before it generates the tag index. What do you think? Could also have a boolean flag if someone does not want that to happen (although not sure what reasons for that could be).

@melissawm
Copy link
Owner Author

That sounds like a simple and easy solution. Currently I'm including it in makefiles when building the docs.

Do you want to submit a PR for it? 😄

@nebelgrau77
Copy link
Contributor

nebelgrau77 commented Oct 8, 2022

Sure, will try! I need to understand where exactly in the code this should happen :)

@melissawm
Copy link
Owner Author

Probably around here which is where the tags folder is created (if it doesn't exist already)

@nebelgrau77
Copy link
Contributor

Right, that seems to be a good place, I will try.

@melissawm
Copy link
Owner Author

Closed by #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants