-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[docs]Maintain separate docs for different releases #5846
Conversation
The changes could be backported to the branches for which doc generation is needed. The server will need a redirection from |
As discussed in private with @dessant there is a disambiguation issue with url redirection with that setup, there seem to be a lack of really nice solutions to this (nginx knowing about all the existing versions would be hacky and a maintenance burden, js stubs to redirect in all the old pages would be sad for a lot of reasons, and letting all the old urls become dead links would be really sad too), so i think the only remaining solution would be to change the url more, here are a few options i could think of.
I don't think too much bikeshedding is needed on this, i think my preference goes to the first (for clarity) and third one (for concision), but maybe someone will propose a better alternative, we can give it a week or so, and then take a decision, as it'll certainly have an impact on the visibility/discoverability of the doc, which is pretty important for the project. |
I'm also ok with both the first and third options, though the third one has started to grow on me. |
👍 for /doc/... How ever I would like to propose to choose a time to delete the existing ones. There are a lot of stale files that still get served up in google with a high enough priority to be in the top 3. Deleting old docs would be necessary to avoid such issues. |
The rsync params should ensure that the docs folder is overwritten, without outdated files left behind. Could you share an example of a stale file from the docs folder? |
I think that's a separate issue, it seems we agree on /doc/ i'll amend the PR to do that. |
This will cause CI to build docs for specific branches when they are pushed to, and to copy the result into a subdirectory of the docs/ directory, instead of the root. The task will also update a "versions.json" file, for the pages to be able to display/select other versions. The doc template is changed slightly to display a select field on top of the quick search, using some js to fill the versions from the generated versions.json file, and to change url when a different version is selected. This has been tested with a local server, trying to emulate the doc structure, but the CI part hasn't been really tested. Known Issues: - the version.json file contains all versions configured to build, but the doc for these might not have been generated yet, which would result in 404 errors. - the logic doesn't know if the current page of the doc exists for the selectable versions, so this will also result in 404 errors when switching to a version that didn't have the current doc page.. - the url manipulation logic is a bit dirty, as it assumes that the path is always of the form of /docs/<version>/…. - theming could certainly be slightly improved.
for versionned documentation
0acfb88
to
a83fbf6
Compare
ready for review i think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The travis changes look ok. Not sure about the css/js. Also, please add that DOC_VERSIONS
needs to be updated to the release checklist.
How will |
Maybe we could rename |
Or we could have a dict with branch names mapped to version names. For example, {
"stable-1.10": "v1.10.0",
"stable": "stable",
"master": "dev"
} |
The standard way is to prefix the version number with a |
release doc updated. |
Ok, so going forward, these will be the URL variations:
|
I think we can wait after the merge and tests to setup the redirection :). |
This will cause CI to build docs for specific branches when they are
pushed to, and to copy the result into a subdirectory of the docs/
directory, instead of the root. The task will also update a
"versions.json" file, for the pages to be able to display/select other
versions.
The doc template is changed slightly to display a select field on top
of the quick search, using some js to fill the versions from the
generated versions.json file, and to change url when a different version
is selected.
This has been tested with a local server, trying to emulate the doc
structure, but the CI part hasn't been really tested.
Known Issues:
the doc for these might not have been generated yet, which would
result in 404 errors.
selectable versions, so this will also result in 404 errors when
switching to a version that didn't have the current doc page..
is always of the form of /docs//….