Migrate to Hugo's alert format
After we implemented our own Alert shortcode, Hugo introduced a built-in Alert formatter: https://gohugo.io/render-hooks/blockquotes/#alerts
This syntax is a lot more like GLFM's: https://docs.gitlab.com/user/markdown/#alerts
Should we migrate to this format and drop the shortcode?
Some things we'd to figure out:
- Do these work inside other types of content or shortcodes (e.g, nested inside an unordered list or tabs)
- How difficult would it be to migrate to the new format?
- What could be dropped from the shortcode transformer in
/help? - How would we need to modify Vale rules? (gitlab-org/gitlab!196976 (merged))
- How would we replace non-standard alert types (Flag, Disclaimer)
Proposed next steps
- Add support in our Hugo theme for the Hugo-style alerts (https://gohugo.io/render-hooks/blockquotes/#alerts). Style these to match our existing alerts.
- Work with a TW to update the style guide to note that the custom shortcode alerts are now deprecated, and to use the Hugo ones instead.
- Work with a TW/DocOps to come up with a migration plan. We might want to start with a warning-level Vale rule for the old style and let them slowly phase out, or we could use a script to perform a larger bulk migration.
- When all projects no longer use the old shortcode, we can look into removing it from the codebase, or replacing it with just an error message to point to the new format.
Edited by Sarah German