Skip to content

Add migration for availability details

Sarah German requested to merge 11-availability-migration into main

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:

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. Checkout this branch
  3. Fetch up-to-date content, but don't run any migrations: REMOVE_BEFORE_CLONE=true go run cmd/gldocs/main.go clone
  4. Run this migration only: go run cmd/gldocs/main.go migrate alerts ../gitlab/doc
  5. 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:

  1. Run the full build process: REMOVE_BEFORE_CLONE=true make clone-docs-projects (runs the initial clones + all migrations)
  2. Run the preview server: make view
  3. Browse around the site and verify that the DETAILS content matches its appearance on the existing site.
Nanoc site Hugo site
image image

Example pages:

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