Skip to content

Do not show YAML frontmatter for doc pages under /help

Achilleas Pipinellis requested to merge hide-frontmatter-help-page into master

What does this MR do?

Remove YAML frontmatter when rendering the pages under /help.

It only checks the first occurrence of the yaml frontmatter.

Why was this MR needed?

We recently started adding YAML frontmatter in docs so that we can show more information, but that only works for the docs portal at docs.gitlab.com.

For example, we want to add a last_updated entry #37677

Whereas this is useful for the docs portal, it looks ugly for docs under /help.

Screenshots (if relevant)

In the following screenshots you can see that only the first occurrence of the yaml frontmatter is removed. The tested document had:

---
first: yaml
---

---
second: yaml
---
Before After
screenshot-localhost_3000-2017-09-19-11-49-02 screenshot-localhost_3000-2017-09-19-11-46-55
Edited by Achilleas Pipinellis

Merge request reports

Loading