How to create you first Jekyll post
- Create a
_posts
folder at the root of your repository - Create a file matching the following pattern
YEAR-MONTH-DAY-title.MARKUP
, eg2016-06-11-this-is-my-first-post.md
.md
means Markdown, which is what’s used on GitHub -
Starts that file with a Front Matter block, like this-is-my-first-post
--- the front matter content ---
The front matter content is following the YAML format, which basically means something like
key1: value1 key2: value2
In our case, we’ll use the following
--- layout: post title: The title of my awesome post! ---
-
Below, simply write your content! Markdown is a pretty simple format to use. You can check https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet for samples
- Save it. If you haven’t already done so, run
jekyll serve
. This will generate the corresponding html file under_site
. Head over to http://127.0.0.1:4000/year/month/day/name-of-your-awesome-post.html (or whatever address and port number is displayed by thejekyll serve
command). Note that the extension will behtml
.
Now you’ll probably noticed that your post is not really sexy…so head over to the next part to fix that.