velero/site/layouts
Bridget McErlean 43f52f1aea Correctly render links with fragments on docs pages
Our previous render hook to create links would drop the fragment when
linking to headings within the current page or within other markdown
pages on the site.

This change parses the URL and formats the link correctly if it includes
a fragment. If the link is a header on the current page, it is rendered
as `http://<current-url>/#header`. If the link is a header on a
different page (e.g. page.md#header), it is rendered as
`http://<page-url>/#header`.

This change is taken from the following Hugo community support post:
https://discourse.gohugo.io/t/markdown-render-hooks-github-and-hugo-compatible-links/22543/14

Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>
2021-03-11 19:01:51 -05:00
..
_default Correctly render links with fragments on docs pages 2021-03-11 19:01:51 -05:00
docs Fix for docs redirects (#2895) 2020-09-02 14:20:46 -07:00
partials Update links to point to main branch (#2915) 2020-09-09 12:11:57 -07:00
plugins Hugo migration (#2720) 2020-08-13 09:09:15 -07:00
posts Hugo migration (#2720) 2020-08-13 09:09:15 -07:00
shortcodes Use inline markdown links in tables (#3114) 2020-12-10 14:07:23 -05:00
404.html Add custom 404 page to website (#3056) 2020-11-09 09:05:40 -08:00
index.html Hugo migration (#2720) 2020-08-13 09:09:15 -07:00
index.redirects Remove references to zenhub (#3357) 2021-01-28 14:21:28 -05:00
robots.txt Hugo migration (#2720) 2020-08-13 09:09:15 -07:00