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

Add redirect for docs #795

Merged
merged 2 commits into from
Jul 3, 2019
Merged

Add redirect for docs #795

merged 2 commits into from
Jul 3, 2019

Conversation

jonasrosland
Copy link
Contributor

This fixes the need to specify master or v0.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]

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

@johnSchnake
Copy link
Contributor

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-io
Copy link

codecov-io commented Jul 3, 2019

Codecov Report

Merging #795 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

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

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afcd78a...4e5187e. Read the comment docs.

@johnSchnake johnSchnake merged commit ad75ce4 into vmware-tanzu:master Jul 3, 2019
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.

3 participants