Table of contents

Content organization

Content are files writen in Markdown (or plain text files) and static (public) files.

Files organization

Pages should be stored in content/ (default directory) and static files in static/.

<mywebsite>
├─ content
|  ├─ blog             <- A Section named "Blog"
|  |  ├─ post-1.md     <- A Page in the "Blog" section
|  |  └─ post-2.md     <- Another Page in the "Blog" Section
|  ├─ project          <- A Section named "Project"
|  |  └─ project-1.md  <- A Page in the "Project" Section
|  └─ about.md         <- A Page in the root
└─ static
   ├─ robots.txt
   └─ styles
      └─ main.css

Folders in the root are called Section (ie: "Blog", "Project", etc.).

Static (public) files are copied as is at the root of the built website.

Page anatomy

Front matter

Any file that contains a front matter will be processed to extract variables.

The front matter must be the first thing in the file and must be a valid YAML.

Example

---
title: The title
date: 2013-01-01
---

Predefined variables

If a Page don't have a front matter, required variables are predefined as following.

Variable Description Default value
title Title File basename without extension, ie: Post 1
section Section Root directory of the file path, ie: Blog
layout Layout See Layout fallback logic, ie: post.html
date Date File modification datetime (PHP DateTime object)
menu Menu Contains a main menu with Homepage and Sections entries
permalink Permalink Page pathname, ie: blog/post-1

Body

Body is the main content of the page, it could be written in Markdown or in plain text.

Example

---
title: The title
date: 2013-01-01
tags:
    - tag 1
    - tag 2
customvar: 'Value of customvar'
---

# Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Suggest a modification Next