Posts
Create a new file named YYYY-MM-DD-TITLE.md
and in the _posts
directory, the top of the file must contain teh following:
1
2
3
4
5
6
7
8
9
| ---
title: Post Title
author:
name: Author Name
link: https://github.com/author
date: YYYY-MM-DD HH:MM:SS
categories: [Main Category, Secondary Category]
tags: [tag1, tag2, tag3]
---
|
If you want to add an image to the top of the post contents, specify the attribute src, width, height, and alt for the image:
1
2
3
4
5
6
7
| ---
image:
src: /path/to/image/file
width: 1000 # in pixels
height: 400 # in pixels
alt: image alternative text
---
|
Titles
1
2
3
4
5
6
7
| # H1 - heading
## H2 - heading
### H3 - heading
#### H4 - heading
|
H1 - heading
H2 - heading
H3 - heading
H4 - heading
Blockquotes
1
2
3
4
| <blockquote>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<span class="author"><i>Lorem ipsum</i></span>
</blockquote>
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum
If you need multiple paragraphs, enter <br/><br/>
tags.
Important
1
2
| <div markdown="span" class="alert alert-warning" role="alert"><i class="fas fa-exclamation-triangle"></i> <b>Important:</b> This is my note. All the content I type here is treated as a single paragraph.</div>
|
Important: This is my note. All the content I type here is treated as a single paragraph.
Note
1
2
| <div markdown="span" class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> This is my note. All the content I type here is treated as a single paragraph.</div>
|
Note: This is my note. All the content I type here is treated as a single paragraph.
Tip
1
2
| <div markdown="span" class="alert alert-success" role="alert"><i class="fas fa-check-circle"></i> <b>Tip:</b> This is my note. All the content I type here is treated as a single paragraph.</div>
|
Tip: This is my note. All the content I type here is treated as a single paragraph.
Warning
1
2
| <div markdown="span" class="alert alert-danger" role="alert"><i class="fas fa-exclamation-circle"></i> <b>Warning:</b> This is my note. All the content I type here is treated as a single paragraph.</div>
|
Warning: This is my note. All the content I type here is treated as a single paragraph.
Callouts
The style for the callout. Options are danger
, default
, primary
, success
, info
, and warning
.
1
2
| <div markdown="span" class="bs-callout bs-callout-primary">This is my callout. It has a border on the left whose color you define by passing a type parameter. I typically use this style of callout when I have more information that I want to share, often spanning multiple paragraphs. </div>
|
This is my callout. It has a border on the left whose color you define by passing a type parameter. I typically use this style of callout when I have more information that I want to share, often spanning multiple paragraphs.
Code Box Highlight
Specific Languages
If you want to avoid showing line numbers, add {: .nolineno}
below your codebox, like so:
1
2
3
4
5
6
7
| ```bash
if [ $? -ne 0 ]; then
echo "The command was not successful.";
#do the needful / exit
fi;
```
{: .nolineno}
|
1
2
3
4
| if [ $? -ne 0 ]; then
echo "The command was not successful.";
#do the needful / exit
fi;
|
Console
1
2
3
4
5
| ```console
$ env |grep SHELL
SHELL=/usr/local/bin/bash
PYENV_SHELL=bash
```
|
1
2
3
| $ env |grep SHELL
SHELL=/usr/local/bin/bash
PYENV_SHELL=bash
|
Shell
1
2
3
4
5
6
| ```bash
if [ $? -ne 0 ]; then
echo "The command was not successful.";
#do the needful / exit
fi;
```
|
1
2
3
4
| if [ $? -ne 0 ]; then
echo "The command was not successful.";
#do the needful / exit
fi;
|
Specific filename
1
2
3
4
5
| ```sass
@import
"colors/light-typography",
"colors/dark-typography"
```
|
1
2
3
| @import
"colors/light-typography",
"colors/dark-typography"
|
Liquid Codes
1
2
3
4
5
|
```liquid
{% if product.title contains 'Pack' %}
This product's title contains the word Pack.
{% endif %}
|
1
2
3
4
5
6
|
```liquid
{% if product.title contains 'Pack' %}
This product's title contains the word Pack.
{% endif %}
|
Lists
Ordered list
1
2
3
| 1. First
2. Second
3. Third
|
- First
- Second
- Third
Unordered list
1
2
3
| - Chapter
- Section
- Paragraph
|
Task list
1
2
3
4
5
6
| - [ ] TODO
- [x] Completed
- [ ] Build Something
- [x] Come up with idea
- [ ] Sketch Workflow
- [ ] Write Code
|
Description list
1
2
3
4
5
| Something
: Description of what something is
Nothing
: Description of what nothing is
|
- Something
- Description of what something is
- Nothing
- Description of what nothing is