Skip to content

Add conditional link target for Free Trial button

Sarah German requested to merge free-trial-omnibus into main

What does this MR do and why?

While working on the Versions menu, I noticed that the "Free Trial" button is conditional based on URL path. 😄

This MR adds that feature to the Hugo site.

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/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Visit a few pages under /omnibus and verify the Free Trial button links here: https://about.gitlab.com/free-trial/?hosted=self-managed
  3. Visit other pages and check that the button points to https://gitlab.com/-/trials/new?glm_content=navigation-cta-docs&glm_source=docs.gitlab.com
  4. Compile the site to use a prefixed URL (make clean && make view-prod), and repeat 2-3 to verify this logic works when the site is served from a subdirectory (like archived version sites).

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.

Merge request reports