Front Matter
Front Matter is a powerful tool that allows pages to define metadata in the
YAML format, metadata defined in page can be used by the theme and
accessed through page
variable. Considering metadata defined below:
---
title: Front Matter
navTitleId: Front Matter
showDocNav: true
---
You can now use page metadata to adjust theme and page accordingly:
<html>
<head>
...
<title><%= page.title %></title>
...
</head>
<body>
...
<h1><%= page.title %></h1>
<%if (page.showDocNav) { %>
<% include partials/docNav %>
<% } %>
...
permalinks
Permalink variable can be used to change the URL of the page, the permalink
path will be used to access the page even if you move it's the location in the
pages
directory.
---
title: First post
permalink: 2018/10/20/first-post
---
My first post
The page in the example above will be accessible through
2018/10/20/first-post
url. If the page is translated leading locale
can be used, ex.: de/2018/10/20/first-post
.