Handling for additional metadata
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.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Run the dev server: make view
-
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.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Sarah German