My example Markdown Post
A minimal example of using markdown with fastpages.
Example Markdown Post
Basic setup
Jekyll requires blog post files to be named according to the following format:
YEAR-MONTH-DAY-filename.md
Where YEAR
is a four-digit number, MONTH
and DAY
are both two-digit numbers, and filename
is whatever file name you choose, to remind yourself what this post is about. .md
is the file extension for markdown files.
The first line of the file should start with a single hash character, then a space, then your title. This is how you create a βlevel 1 headingβ in markdown. Then you can create level 2, 3, etc headings as you wish but repeating the hash character, such as you see in the line ## File names
above.
Basic formatting
You can use italics, bold, code font text
, and create links. Hereβs a footnote 1. Hereβs a horizontal rule:
Lists
Hereβs a list of my favorite sports to play:
- Football
- Basketball
- Track and Field
Boxes and stuff
This is a quotation
β¦andβ¦
Images
49ers Logo
Code
You can format text and code per usual
General preformatted text:
# Do a thing
do_thing()
Python Code Embeds:
Addition and Subtraction Calculator
num_1 = input('Enter your first number: ')
num_2 = input('Enter your second number: ')
num_1 = int(input('Enter your first number: '))
num_2 = int(input('Enter your second number: '))
# Addition
print('{} + {} = '.format(num_1, num_2))
print(num_1 + num_2)
# Subtraction
print('{} - {} = '.format(num_1, num_2))
print(num_1 - num_2)
Formatting text as shell commands:
```shell
echo "hello world"
./some_script.sh --option "value"
wget https://example.com/cat_photo1.png
Formatting text as YAML:
key: value
- another_key: "another value"
Tables
First Name | Last name |
---|---|
LeBron | James |
Tom | Brady |
Lionel | Messi |
Tweetcards
This will be Mars one day pic.twitter.com/nf4hML8dKx
β Elon Musk (@elonmusk) August 12, 2022
Footnotes
-
This is my footnote. Markdown is a markup language in which you can add formatting elements to plaintext text documents.Β β©