An Example Markdown Post

A minimal example of using markdown with fastpages/Quarto.
blogging
Author

fastpages & quarto

Published

January 14, 2020

Modified

December 10, 2023

Note

This post was generated by fastpages and kept for reference.

Note that the blog was later moved from fastpages to Quarto and this page was adjusted. Still not all tips may be up to date anymore. More useful tips on authoring with Markdown are in the Quarto Guide.

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:

  • item 1
  • item 2

And a numbered list:

  1. item 1
  2. item 2

Callout Boxes and stuff

This is a quotation

Tip

Note that there are five types of callouts, including: note, warning, important, tip, and caution.

and

This is an example of a ‘folded’ caution callout that can be expanded by the user. You can use collapse="true" to collapse it by default or collapse="false" to make a collapsible callout that is expanded by default.

Images

“fast.ai’s logo”

Code

You can format text and code per usual

General preformatted text:

# Do a thing
do_thing()

Python code and output:

# Prints '2'
print(1+1)
2

Formatting text as shell commands:

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

Column 1 Column 2
A thing Another thing

Equations

Inline: \(E = mc^2\) And display math:

\[\alpha \beta \gamma\]

Footnotes

Footnotes

  1. This is the footnote.↩︎