-
Notifications
You must be signed in to change notification settings - Fork 345
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
Add redirect for docs #795
Conversation
Signed-off-by: jonasrosland <[email protected]>
@@ -7,7 +7,7 @@ | |||
<li class="home"><a href="/" title="{{ site.title }}">Home</a></li> | |||
<li class="blog"><a href="/blog" title="Blog Posts">Blog</a></li> | |||
<li class="community"><a href="/community" title="Community">Community</a></li> | |||
<li class="docs"><a href="/docs/v0.15.0">Documentation</a></li> | |||
<li class="docs"><a href="/docs">Documentation</a></li> |
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.
Also need to adjust the URL for the footer: https://github.com/heptio/sonobuoy/pull/795/files#diff-0a55ba953b4a00424ce1150c8cb5e4efR17
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.
Thanks for catching that, I've updated the PR.
One small modification needed; then I think it is good to go. Some of the front-end code is over my head but it just came from a 3rd party, commonly used repo (https://github.com/avillafiorita/jekyll-datapage_gen) and seems to work as expected. Thanks for taking this on @jonasrosland ; I had no idea that getting redirects to work would have taken a PR of this size. |
Signed-off-by: jonasrosland <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #795 +/- ##
=======================================
Coverage 42.64% 42.64%
=======================================
Files 71 71
Lines 4193 4193
=======================================
Hits 1788 1788
Misses 2298 2298
Partials 107 107 Continue to review full report at Codecov.
|
This fixes the need to specify
master
orv0.15.0
or similar when linking to the latest docs from the README and other sources.It will automatically redirect https://sonobuoy.io/docs to the latest version, as specified in _config.yml.
It also redirects any links specified in _data/shortlinks.yml, to their latest counterpart.
For example, https://sonobuoy.io/docs/gen will redirect to the latest version, currently https://sonobuoy.io/docs/v0.15.0/gen.
This also fixes the need to specify the latest version in the navigation header.
Signed-off-by: jonasrosland [email protected]