Create New Blog Post with Jekyll

Will Johnson
InstructorWill Johnson

Share this video with your friends

Send Tweet
Published 2 years ago
Updated a year ago

Blogging is built into Jekyll. You write blog posts as markdown or HTML files and Jekyll turns them blog posts. They follow a specific naming convention to be picked up and used by Jekyll

All blog post files require front matter. Front matter is a snippet of YAML at the top of a file. Front matter is used to set your layouts and meta data.

Will Johnson: [0:01] To create a new blog post in Jekyll, go to the _posts folder, then create a new file. Start the title with the date, and then the name of the file. For this, we would do All the blog posts in Jekyll are written in Markdown.

[0:20] At the top of the page, we also need front matter. Let's go to the sample blog post and copy the front matter into our new file. We can change the title to New Blog Post. Since it is a Markdown file, let's add a heading, New Blog Post Thanks!

[0:52] We will save that file, go to the terminal, run bundle exec jekyll serve, refresh the localhost, and we will see our new blog post. We can click the blog post and see our heading we created of New Blog Post Thanks!

[1:10] To recap, we went to the _posts folder, created a new file with the date and the name of the blog post. That's Markdown. We added front matter to the top of the new blog post, changed the title, and used markdown syntax to add a header of New Blog Post Thanks!