-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support docs for previous versions (and "latest", "stable", etc.) and languages other than English #15
Comments
Once we have tags, they should appear automatically. The regex is tighted to just the "main" branch right now but we can loosen it to build docs for other branches as needed. For now "en" is hard coded but sphinx-intl might be worth investigating in the future.
I just pushed e2f5e5f and we now have the "en" and "main" components of the URL I wanted. That is, if you go to the root of the website, you will be redirected to en/main/index.html "en" is hard-coded for now. Again, we can spend some time with Currently I have only the "main" branch being build and displayed in the sidebar... ... but we can loosen the regex I added to include other branches if we want. Once we start pushing tags, they should appear automatically but we can add a regex to exclude any tags we don't want. |
@raprasad and I talked some more about "main" vs "latest" today and we much prefer "latest". The way I know how to fix this is to rename the branch from "main" to "latest". For some more background, "latest" is what Read The Docs uses. It means the latest code in your development branch (master or main or whatever). See https://docs.readthedocs.io/en/stable/versions.html . So that's what we're going to try to simulate. |
In 6406a8a I made the necessary changes in git. Then I changed the default branch for this repo to from "main" to "latest". @raprasad @lurosenb and others who have been hacking on docs, it might be easiest to simply re-clone. Please let me know if you see anything amiss. The bottom line is that https://docs.opendp.org should now redirect to https://docs.opendp.org/en/latest/index.html I think it looks much better. 😄 |
It's fairly common for software projects to provide documentation for previous versions like this:
Likewise, often you can see the most recent unreleased version of the docs at "master" (indicating the default branch):
It's also nice to have "stable" indicate the most recent release:
Finally, it's nice to have translations available (if you have translators):
All of this makes me think that we should add "en" and "main" (for our default branch) for now like this:
That way, we have a namespace in which to grow for versions and languages.
My thinking is heavily influenced by Read the Docs, which has a nice write up about versions at https://docs.readthedocs.io/en/stable/versions.html and languages at https://docs.readthedocs.io/en/stable/guides/manage-translations.html
Read the Docs also has a nice picker that lets your switch between versions and languages:
For now, I don't think we should worry about languages apart from using "en" to give us room the the URL for other languages. I did play a bit with
sphinx-intl
but actually getting it all set up seems like overkill right now.For versions I've been playing with
sphinx-multiversion
and it seems promising.The text was updated successfully, but these errors were encountered: