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

Version website with Mike #48

Merged
merged 3 commits into from
Sep 5, 2023
Merged

Version website with Mike #48

merged 3 commits into from
Sep 5, 2023

Conversation

tsipinakis
Copy link
Member

@tsipinakis tsipinakis commented Sep 3, 2023

Changes introduced with this PR

Introduce full website versioning with mike as recommended by mkdocs docs. While we do copy old version reference docs in the reference guide mike gives some distinct advantages, namely:

  1. We can version all aspects of the site including getting started, installation guides etc
  2. We do not have to rebuild, curate or make sure the old documentation is buildable/looks good with new mkdocs versions, mike does not rebuild old versions of the docs and simply lets them sit in the gh-pages branch.

This commit also updates the github actions workflow to automatically push the main branch to the upcoming version and any v* branches to the respective versions.

I'll merge in a weeks time unless someone stops me for a review.

2023-09-03T20-17-40
2023-09-03T20-17-51


By contributing to this repository, I agree to the contribution guidelines.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

FYI, this would version the entire site not just the reference manual. The reference manual needs to be restructured too and redirects should be added.

@tsipinakis tsipinakis merged commit cf9e9d0 into ContainerSSH:main Sep 5, 2023
@tsipinakis
Copy link
Member Author

tsipinakis commented Sep 5, 2023

Indeed, that's to be handled next. One case that's currently broken is that mike doesn't add redirects for old links at the root at all AFAIK. You're running a reverse proxy for containerssh.io right? Can you add a redirect of containerssh.io/foo/bar -> containerssh.io/latest/foo/bar?

Where foo != v* or upcoming or latest (the tags we're currently using)?

@tsipinakis
Copy link
Member Author

tsipinakis commented Sep 5, 2023

Actually I might have fixed it by copying the redirect files from latest to the root.
https://containerssh.github.io/getting-started/docker/ -> https://containerssh.github.io/v0.4/getting-started/docker/ works

For some reason https://containerssh.github.io/getting-started/kubernetes/ -> https://containerssh.github.io/v0.4/getting-started/kubernetes/ doesn't though, weird. It's the same code.

In any case, currently containerssh.io 404s I assume that's some cache?

Fixed it now, it appears all is good.

@schwzr
Copy link

schwzr commented Sep 5, 2023

In any case, currently containerssh.io 404s I assume that's some cache?

To use a custom domain you need a CNAME file in the root directory of your gh-pages branch.

Currently it seems you moved the CNAME file in the v0.4-subdirectory:

https://github.com/ContainerSSH/containerssh.github.io/blob/gh-pages/v0.4/CNAME

@tsipinakis
Copy link
Member Author

Ah, that explains it thanks. I was under the impression that @janosdebugs was running a reverse proxy for the domain and its cache/configuration was causing the 404. Will fix it asap.

@tsipinakis tsipinakis mentioned this pull request Sep 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants