Add migration for availability details
What does this MR do and why?
Migrates availability details (tier/status/offering info) to the Hugo shortcode version.
Note that this does not include version history, which is a separate element (!83 (merged)).
Related:
- Issue: Port markdown filter: Availability details (#11 - closed) • Sarah German
- Frontend MR: Add shortcodes for availability and history (!81 - merged) • Sarah German • 17.1
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. -
Checkout this branch -
Fetch up-to-date content, but don't run any migrations: REMOVE_BEFORE_CLONE=true go run cmd/gldocs/main.go clone
-
Run this migration only: go run cmd/gldocs/main.go migrate alerts ../gitlab/doc
-
View the diff: git -C ../gitlab diff
Expected result: In addition to the existing alert migrations for WARNING
, INFO
, and DISCLAIMER
alerts, we should now see diffs for DETAILS
alerts. Diffs should be something like this:
Before:
DETAILS:
**Tier:** Free, Premium, Ultimate
**Offering:** Self-managed
After:
{{< details >}}
- Tier: Free, Premium, Ultimate
- Offering: Self-managed
{{< /details >}}
We can also test the end-to-end build with the migration:
-
Run the full build process: REMOVE_BEFORE_CLONE=true make clone-docs-projects
(runs the initial clones + all migrations) -
Run the preview server: make view
-
Browse around the site and verify that the DETAILS
content matches its appearance on the existing site.
Nanoc site | Hugo site |
---|---|
Example pages:
- Nanoc: https://docs.gitlab.com/ee/user/ai_features.html#code-suggestions / Hugo: http://localhost:1313/user/ai_features/#code-suggestions
- Nanoc: https://docs.gitlab.com/ee/administration/auth/ / Hugo: http://localhost:1313/administration/auth/
- Nanoc: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html / Hugo: http://localhost:1313/user/project/integrations/webhooks/
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.
Edited by Sarah German