Skip to content

Substitute relative paths with absolute links.

Séamus O'Sullivan requested to merge fhv480/Open-WIN-Community:links into master

Use Jekyll link tag to specify paths instead of relative markdown paths, like so:

'[Home](../../index.md)' -> '[Home]({% link docs/index.md %})'.
'[Gitlab Logo](../../../img/gitlab-logo.png)' -> '[Gitlab Logo]({% link img/gitlab-logo.png %}).

This is a follow up to issue #65 and has a few additional benefits. Currently, a large number (most?) of the relative links to other pages on the site are broken. This should hopefully fix that problem. Also, if you write your links in this style, Jekyll will fail to build if the link doesn't point to an actual file. This would allow us to more easily change the directory structure, knowing that if we invalidate any links, it will be very obvious in testing.

The disadvantages are that markdown files will no longer have image preview in the Gitlab UI, and links to specific parts of pages (e.g., ../index.md#heading2) aren't possible in this style (at the moment, most of the links are completely broken anyway).

Sorry for the enormous PR! I thought it would be best to do it all in one go. I tried to get all of the links, but most likely I missed one or two.

WARNING: this will only work if the Jekyll version is above 4.0, see this section of the Jekyll docs for more information.

Merge request reports

Loading