Support Hugo alert format

What does this MR do and why?

This MR adds support for Hugo's alert format. As an alternative to the Alert shortcode, this MR allows you to create the same Note, Warning, Flag, and Disclaimer alerts using less code:

> [!NOTE]
> Note type of render-hook alert

The type of alert is specified in brackets with case-insensitive text. ("NOTE", "note", and "Note" all work.)

Screenshot_2025-12-08_at_10.09.43_AM

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.
  2. Check out this branch.
  3. In the browser, view /shortcode-tests#render-hook-alerts.
  4. In the shortcode-tests file or in your local copy of the GitLab repository, replace an {{< alert >}} shortcode with the Hugo alert syntax and view the result in the browser. You should see no changes.

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.

Closes #409

Edited by Pearl Latteier

Merge request reports

Loading