Skip to content

Rewrite logic - can it exist within Sphinx or should it never happen at the Sphinx level? #11922

Closed Answered by picnixz
kaycebasques asked this question in Q&A
Discussion options

You must be logged in to vote

I would say "no" to be on the safe side. If you want to rename how your files are being served, that's something you should likely do at the server-level but not at the generation level.

One reason is that if you change the docname, then you need to update all related references. Also, since Sphinx runs in two steps, where in the first you build and the second you write, there should be a consistency between these two, namely you should also remember the association. Also, I don't exactly remember but I think the writing phase uses the docnames that were used by the building phase to write things on the disk.

Can you give me an example of why you would want this rewrite logic?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by kaycebasques
Comment options

You must be logged in to vote
1 reply
@picnixz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants