Add conditional link target for Free Trial button
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.
- Pages under
/omnibus
have a button that points here: https://about.gitlab.com/free-trial/?hosted=self-managed - On other pages, the button points here: https://gitlab.com/-/trials/new?glm_content=navigation-cta-docs&glm_source=docs.gitlab.com
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Visit a few pages under /omnibus
and verify the Free Trial button links here: https://about.gitlab.com/free-trial/?hosted=self-managed -
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 -
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.
-
I have evaluated the MR acceptance checklist for this merge request.