-
Notifications
You must be signed in to change notification settings - Fork 4
2.3 Page content variables and structure
Each page can uses a front matter section to give it characteristics that can be used in the templates. Pages and content are held in the following folders:
- _news - the news articles or blog posts
- _pakepu - the articles about Pakepu
- _coffins - the further reading and glossary pages relating to coffins (this could be moved)
- _senuitef - the articles about Senuitef
- _nespawershefyt - the articles about Nespawershefyt
- _nakhtefmut - the articles about Nakhtefmut
Page content is held in files that end with .md signifying that they are markdown text files. This is important and they will get rendered properly if they end with this file name.
So each page, has a section at the top in between two lines of 3 dashes like this:
---
text in here
---
This essentially is the metadata to describe the page. We are going to use these basic variables on the site (more advanced use is also made, see this section on images and this one on files):
- layout - the layout for the section you are in (more on this in layouts section)
- title - the title of the page
- date - the date created (in the format YYYY-MM-DD)
- category - this reflects the folder in which the page will exist, so a news article is in category, you guessed it news
- author - your name
- description - the description of the page
- permalink - this is the page url you want to use
Above, the very last variable is called permalink, this maybe alien to you, but don't worry! We want our urls to be semantic and tell the user where they are going! So we want to use this format:
/section/descriptive-page-title
So for example, if your page was in Nakhtefmut and was about the eyes on the face you would enter the following as a permalink variable:
/nakhtefmut/the-eyes-on-the-face
Note that the descriptive part is all lowercase and has no punctuation and is hyphenated - this is the way it must be done.
So for example a page may begin with the following:
---
layout: coffins
title: Mummy case of Nakhtefmut
date: 2018-12-12
author: Daniel Pett
permalink: /coffins/nakhtefmut
category: nakhtefmut
description: A wonderful descriptive page
---
Out of these variables, the following are mandatory:
- layout
- title
- permalink
- category