You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jekyll is the underlying technology used for GitHub Pages. Jekyll parses markdown and liquid files to HTML pages for a site.
Generally Jekyll expects "frontmatter" - a `---` delimited block at the top of the markdown file -.
The existence of the frontmatter indicates to Jekyll that the page should be _processed_ by the transformation engine and not just copied over.
Frontmatter also allows for adding variables to the page which can be used in the page/theme to do certain things.
Even though for GitHub Pages, a plugin is active which make the frontmatter not _strictly_ necessary, for this "PHPCS docs" type of website it is useful.
By default, the first `#` (H1) header will be regarded as the `page.title` and this page title is then subsequently used in the website menu and such.
As for these sniff pages, the default title is the full sniffname `Standard.Category.SniffName` and the `Standard` and `Category` are already "levels" in a typical menu due to the folder structure, it is less noisy to use just the plain `SniffName` as the `page.title`.
To that end, I'm adding a separate `JekyllPageGenerator` class which extends the standard `MarkdownGenerator` class and adds the _frontmatter_ to the page.
This will also allow for extending the available frontmatter with additional keys in the future if deemed necessary.
Includes test.
0 commit comments