Creating blog posts

Mikko Luhtasaari · October 11, 2020

Meta info

Every post starts with some meta information about it. Layout is usually post. Title is the title of the post. Categories is either a string or an array of categories. You can see a few examples below:

---
layout: post
title: Creating blog posts
categories: Reverie
---
---
layout: post
title: Setting up Reverie based blog on GitHub Pages
categories: [GitHub, GitHub Pages, Reverie]
---

You can also check out the examples from my GitHub.

Writing the posts

The posts are written by using MarkDown. Markdown is really simple and easy to read markup language. A good cheatsheet can be found from here.

Let’s take a quick look at the most common things you are going to do with markdown.

Headers

There are six different levels of headers similar to H1-H6. Lower number equals bigger header.

# H1
## H2
### H3
#### H4
##### H5
###### H6

produces an output like

H1

H2

H3

H4

H5
H6

Lists

There are two kinds of lists; ordered and unordered.

1. first item
2. second item

* Unordered item
* More unordered items
  * A list inside list

produces an output like

  1. first item
  2. second item
  • Unordered item
  • More unordered items
    • A list inside list
[This is a link!](https://github.com/MikkoLuhtasaari/)

[This link has a title!](https://github.com/MikkoLuhtasaari/ "I'm the title!")
![I'm alt text for the image](https://via.placeholder.com/150)
![Images can also be uploaded to the repository](/images/2020-10-04/01.PNG)

produces an output like

This is a link!

This link has a title! I'm alt text for the image Images can also be uploaded to the repository

Code highlighting

You can highlight various different languages. See examples below and the syntax from bottom of this file.

JavaScript:

const greet = (name) => console.log(`Hello ${name}!`);

Python:

print("Hello world!")

HTML:

<h1>Hello world!</h1>

CSS:

.heading {
    background-color: "black";
}

Twitter, Facebook