This article will describe how to author pages and blog posts. Posts are authored in Markdown, see references here. The site is compiled using Jekyll, with some help from Jekyll Bootstrap.
Blog posts are created in the _posts directory.
To create categories, create a folder for the category and place the posts in
the _posts subdirectory of the category directory.
The filename must be DATE-TITLE.md (eg admin/_posts/2015-12-29-publishing-an-article.md).
The file must begin with a YAML Front Matter block, even if it is empty.
YAFM blocks are delimited by lines containing three dashes.
---
---
The file should have the following entries in the YAFM block:
---
layout: post
title: My Post
author:
name: Your Name
email: you@yoursite.example.com
github: username
date: 2015-12-29 13:59:00 -08:00
description: ""
tags: []
---
{% include JB/setup %}
layouttells Jekyll which layout (in the_layoutsdirectory) to use for this file. It must be eitherpostorpage.titleis used as the page title.authoris for info about the post author. It can have nested entriesname,email, andgithub.nameis the Author’s name (required, or don’t create theauthorblock).emailis the Author’s email address (optional, appears in newsfeeds).githubis the Author’s GitHub user name (optional, creates a link to your profile).
dateis the date, time, and timezone of publication. Jekyll uses this to sort the posts.descriptionis the page description which appears on the newsfeed and other pages.tagsis an array of tags for the post
If you have installed Jekyll locally, you can create a new post using the rake command:
$ rake post title="Hello World"
This will create a file with the correctly formatted filename and YAFM block.
Note that you must still add the author block.
You can also create pages using rake:
$ rake page name="about.md"
A page is an HTML or Markdown file (with YAFM block) that does not represent
an “article”.
Otherwise, a page is identical to a post except for the layout: post
and lack of any category or tags entries in the YAFM block.
For more info, read the Jekyll Quick Start