Skip to content

Handling for additional metadata

Sarah German requested to merge additional-metadata into main

What does this MR do and why?

Conditional rendering for parts of the page, based on front matter attributes: noindex, toc, and feedback.

This copies over this existing functionality and should behave the same way: https://docs.gitlab.com/ee/development/documentation/metadata.html#additional-metadata,

These front matter options are not included here:

  • searchbar: we won't need this on the new site; it is currently unused in regular content.
  • redirect_to: redirects will be handled in #29 and #30

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. Run the dev server: make view
  3. Add front matter like this to a page:
toc: false # hide the toc
noindex: true # include a noindex metatag
feedback: false # hide the help & feedback panel

These should behave as described here: https://docs.gitlab.com/ee/development/documentation/metadata.html#additional-metadata

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