bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

5.0 documentation "View on Github" hyperlink is 404ing

Open KartoffelCheetah opened this issue 3 years ago • 1 comments

Prerequisites

Describe the issue

In some versions the "View on GitHub" hyperlink inside documentation goes to Github's 404 page.

Example:

The following page https://getbootstrap.com/docs/5.0/components/modal/ includes a hyperlink near the top of the page to the md file at https://github.com/twbs/bootstrap/blob/main/site/content/docs/5.0/components/modal.md . Since the link does not point to a fixed tag, but the main branch it cannot find the "5.0" folder which was since renamed to "5.2".

At least in the current version it's generated like this:

{{ .Site.Params.repo }}/blob/main/site/content/{{ .Page.File.Path | replaceRE `\\` "/" }}

https://github.com/twbs/bootstrap/blob/713d7140f18514c916f75be34e809ebe00c1691c/site/layouts/_default/docs.html#L19

Reduced test cases

  1. Open the page https://getbootstrap.com/docs/5.0/components/modal/
  2. Click the button "View on Github"
  3. The 404 Github page is displayed.

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Firefox

What version of Bootstrap are you using?

5.0

KartoffelCheetah avatar Jul 26 '22 20:07 KartoffelCheetah

Oh good catch @KartoffelCheetah! Thanks for reporting this one! As you mentioned we could try to point to the tag rather than the main branch. In this case it would be nice to modify our gh-pages branch to fix it for previous versions as well.

julien-deramond avatar Jul 27 '22 05:07 julien-deramond