How to write a Blog Post
The aim of this post is to give simple instructions on how to write a blog post for this web site. Mostly because the instructions I could find where all wrong in some respect!
-
Ensure you are logged into GitHub.
-
Navigate to https://github.com/gretton-dann/gretton-dann.github.io/tree/master/_posts
-
Click ‘Create new file’
-
In the box title “Name your file…” put in a file name in the following format:
YYYY-MM-DD-hyphen-separeted-title.markdown
. See other files in that directory for examples. Don’t use spaces in the filename. -
In the large text box add the following:
---
layout: post
title: "TITLE"
date: YYYY-MM-DD HH:MM:SS +0000
categories: CAT-1 CAT-2
---
Where:
- TITLE: Should be the blog title
- YYYY-MM-DD HH:MM:SS: Should be the current date
- CAT-#: Are category names. You can make these up!
-
Under that enter your blog post. The text is in Markdown format. Instructions on the Mastering Markdown page.
Note there is a Preview button which will give a basic idea of how the page will look. But it is not 100% accurate.
-
In the box ‘Commit new file’ enter a short title for the commit. “Add blog post for YYYY-MM-DD” is fine. Also add a longer description if you feel it is necessary.
-
Ensure “Commit directly to the master branch” is selected. (Yes this is extremely bad practice - but I did say “simple”).
-
Click the green “Commit new file” button.
-
Wait up to 20 minutes for the blog to land on the homepage.