Skip to content

Allow Nanoc to process headings in Markdown or in frontmatter

What does this MR do and why?

For gitlab-org/technical-writing-group/gitlab-docs-hugo#56, we eventually need our Markdown files containing documentation to use the title frontmatter instead of regular markdown level 1 headings.

This MR allows nanoc to support both ways of declaring a level 1 heading (regular style or Hugo style).

How to set up and validate locally

  1. Set up a Docs local preview.
  2. Check out this branch.
  3. Run make view. Go to the local preview and confirm all the titles and pages look ok. In particular:
  4. In the gitlab checkout, modify doc/development/index.md by removing the level 1 heading and adding title: Contribute to development as a test to the frontmatter.
  5. Run make view. Go to the local preview and confirm all the titles and pages look ok. In particular:

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.

Merge request reports