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

make switcher match gh-pages #2007

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

Conengmo
Copy link
Member

#1965 was a really helpful change to get our docs versioning updated automatically on release. It got us a large way there, but not fully. I noticed while the dropdown in the UI is updated correctly, it doesn't fully correspond to the folder situation on our gh-pages branch. See https://github.com/python-visualization/folium/tree/gh-pages.

The issue is we have a main index.html that redirects to latest/index.html. To make things easy, we'd ideally not have to update this redirect, but always put the latest release version in the stable branch.

Furthermore, I'd like it if there are not two entries in the dropdown for the same version. So 'latest' should now refer to v0.17.0, and there shouldn't also be a v0.17.0 option. And 'latest' should make clear it refers to v0.17.0, by including a name like "latest (v0.17.0).

  • I updated @merschformann's script to include these two changes.
  • I updated the doc creation workflow to create two folders on release: one with the versioned folder name and one in latest/.
  • I updated the switcher.json to be prepared for the new version of the script.

@merschformann don't know if you have time and are interested to review this one? Thanks again for your original work, made it easy to make this step.

@Conengmo Conengmo added the documentation Documentation about a certain topic should be added label Oct 17, 2024
Copy link
Contributor

@merschformann merschformann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Makes a lot of sense to me. 🙌

break
if latest_index is None:
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even realize this kind of for / if / break / else combo was possible. TIL, interesting. 👍

Comment on lines +87 to +88
destination_dir: latest
keep_files: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read this correctly, these 2 lines will "re-deploy" to latest every time this executes, thus, having the latest docs always available in that dir. Nice and simple. Makes sense to me. ☺️

@Conengmo
Copy link
Member Author

Thanks Marius! Appreciate you taking the time to take a look at this. I'll give this a try once we fixed the publish docs workflow.

@Conengmo
Copy link
Member Author

pre-commit.ci autofix

@Conengmo Conengmo merged commit 0369da1 into python-visualization:main Oct 21, 2024
12 checks passed
@Conengmo Conengmo deleted the update-docs-versioning branch October 21, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation about a certain topic should be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants