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

Support docs for previous versions (and "latest", "stable", etc.) and languages other than English #15

Open
pdurbin opened this issue May 7, 2021 · 3 comments
Assignees

Comments

@pdurbin
Copy link
Contributor

pdurbin commented May 7, 2021

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:

Screen Shot 2021-05-07 at 4 43 46 PM

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.

pdurbin added a commit that referenced this issue May 10, 2021
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.
@pdurbin
Copy link
Contributor Author

pdurbin commented May 10, 2021

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 sphinx-intl if we get people to translate our docs.

Currently I have only the "main" branch being build and displayed in the sidebar...

Screen Shot 2021-05-10 at 3 10 28 PM

... 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.

@pdurbin
Copy link
Contributor Author

pdurbin commented May 25, 2021

@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.

pdurbin added a commit that referenced this issue May 25, 2021
github-actions bot pushed a commit that referenced this issue May 25, 2021
@pdurbin pdurbin self-assigned this May 25, 2021
@pdurbin
Copy link
Contributor Author

pdurbin commented May 25, 2021

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. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant