Velero: Provide version redirection for documentation pages other than index

Created on 28 Sep 2018  路  10Comments  路  Source: vmware-tanzu/velero

What steps did you take and what happened:

Navigating to https://heptio.github.io/ark/ will redirect the user to https://heptio.github.io/ark//index.html. However, navigating to https://heptio.github.io/ark/support-matrix results in a 404, not a redirect.

What did you expect to happen:

Navigating to subpages could, hopefully, try to redirect to page in the latest version so long as it's present. This would be helpful for pointing to things like install instructions or the support matrix generically, such as links provided by support bots.

https://github.com/heptio/ark/blob/gh-pages/_layouts/redirect.html currently controls the index redirect, maybe it can be updated to be more generic.

AreDocumentation Good first issue Help wanted

Most helpful comment

Thanks @kanav99! For what it's worth, I think the fix for this will actually work with the plan for our docs site. Right now we have a generators that produce the Jekyll content for a particular version in the gh-pages branch. However, we'll be moving to having the Jekyll content directly in docs, as I understand it.

The timeline on that isn't clear yet, so thanks for tackling this!

All 10 comments

The latest version of the site is defined in the _config.yaml file.

I tried making an install-overview.md file at the root with these contents:

---
title: Redirecting...
redirect.to: {{ site.latest }}/install-overview
---

It didn't appear to do the right thing, though. I didn't get a 404, rather a page with the empty docs layout.

For anyone who picks this up, Heptio is looking at redoing our documentation for open source projects, so fixes here may be temporary.

Can I take up this issue?

Hi @kanav99. We might be changing the way we do documentation soon. If you'd still like to make this improvement, it would be nice. I'm assigning it to me to signal that it is taken.

Yeah I still want to fix this. I will make a PR soon.

Thanks @kanav99! For what it's worth, I think the fix for this will actually work with the plan for our docs site. Right now we have a generators that produce the Jekyll content for a particular version in the gh-pages branch. However, we'll be moving to having the Jekyll content directly in docs, as I understand it.

The timeline on that isn't clear yet, so thanks for tackling this!

@kanav99 let me know if I can provide any information -- I helped set up the gh-pages branch for the docs originally, and will be shepherding through the move to publishing from a /docs directory in master. We'll be putting the whole jekyll build into that directory so that we can control and customize it; I think that anything you add to the current gh-pages branch should port over nicely. And if you're interested in helping test/troubleshoot the new jekyll build when we're ready, let me know that too.

Sorry I was a bit caught up in college examinations. I have got the complete idea of this task, just need a few days and I guess the task would be completed.

In case it helps, looking at Nolan's attempt ^^ -- it's missing the base URL. I wonder whether the URL needs to be complete (not relative).
Another possibility might be a redirects file, although that would probably be more maintenance going forward.

@nrb I think we can close this as resolved now - do you agree?

Yep!

Was this page helpful?
0 / 5 - 0 ratings