-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Disable link to pdf/epub builds in footer if appropriate #1431
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
Conversation
That will allow us easier derivatives of the fake_paths function.
We will need this later for testing has_pdf and has_epub.
f9d9ccd
to
86a6236
Compare
I'm not sure how things work, but might it also be a good idea to remove the generated PDF's when PDF generation is shut off? As long as the link still works, people may still find it in Google results when making searches. |
We have bigger design decisions around what to do with old/stable/deleted content, which the issue of what to do with PDF's in this case should be resolved. We generally don't want to break existing links to files. My guess is that we should be deleting "evergreen" content -- "stable" and "latest", and perhaps all branches. But keeping tags around forever, since they by definition will never change. That conversation is happening at #1408 if you want to follow it. I'll merge this however, to fix this issue. |
Disable link to pdf/epub builds in footer if appropriate
Prior to the change to allow disabling pdf/epub the system made sure that the different formats were always equal by making sure failure to generate one rolled back them all. Now that you can disable PDF (for example), it's now possible "pdf/project/latest/project.pdf" doesn't match the "latest" html docs as a new build of of the html docs (after disabling the PDF) will update just the html and leave the PDF version in a prior state. Maybe it should just be that when a "build" is done, it updates all types as before, but the "update" for disabled types is simply to delete it. I'm not sure if this belongs in the discussion of deleting branches/tags as it's more about making sure the different types within the same branch/tag are the same version. |
The reason for this is that old versions which had PDF builds in the past and for which the PDF builds have been disabled will keep the stale PDF of old builds lying around. We need to delete the artifacts if they exist and are disabled for the current build. Addresses #1431 (comment)
@gregmuellegger thanks for the update! |
As reported in #1425 we don't hide the PDF builds yet when the
enable_pdf_build
option is set (same for epub). This pull request fixes it and includes tests for it.Fixes #1425.