Skip to content

Remove empty link fragment from default template

Sarah German requested to merge drop-empty-fragment into main

What does this MR do and why?

Removes an empty href attribute from the mobile navigation toggle. This throws a false positive when running a link check with Lychee, and it's not actually needed for the toggle.

We found this issue here: gitlab-org/technical-writing-group/gitlab-docs-hugo#31 (comment 1948149145)

Screenshots, screen recordings, or links to review app

No visual changes.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. On this branch, compile the site: make compile
  3. Run a Lychee test against the full site: lychee --offline --include-fragments public

Lychee should not find any broken links. Without this change, it flagged the # on every page that uses the default template (so, 99.9% of our pages).

Let's also make sure this doesn't bork our mobile nav:

  1. Run the preview server: bundle exec nanoc view
  2. Resize your browser to small-width and verify you can still open/close the mobile navigation.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah German

Merge request reports