Style guide

For future Joey

Copy from this post when writing a new one. The source is content/posts/style-guide.md. The title, date, and tags above the line come from the front matter. Set toc: true when a post is long enough to need a table of contents.

Headings

The post title is the only first-level heading. This section title is a second-level heading. The ones below are the deeper levels.

Third level

Fourth level

Fifth level
Sixth level

Inline text

A paragraph can mix bold, italic, both, strikethrough, and a link. Use backticks for a short name such as a command, file, or function.

Footnotes sit at the bottom of the page.1

Code

A fenced block with a language name:

# Build the site
hugo --minify

# Preview it
hugo server

A second language, so the label changes:

package main

import "fmt"

func main() {
    fmt.Println("hello")
}

The same block written with Hugo’s highlight shortcode:

<p>Hello</p>

Lists

Unordered:

Ordered:

  1. Write the post in content/posts/
  2. Save the file
  3. Refresh the preview

Nested:

Tasks:

Definition list:

Hugo
The static site generator.
Chicago7
The look this site is based on.

Quote

Don’t communicate by sharing memory, share memory by communicating.

— Rob Pike

Table

SyntaxRenders as
**bold**bold
*italic*italic
`code`code

Rule

Three dashes on their own line:


Picture

Site logo

Small HTML

These need raw HTML in the Markdown file.

GIF is an image format.

H2O and E = mc2

Press Ctrl + C to stop the preview.

Highlighted words use the mark tag.


  1. The footnote marker in the paragraph jumps here. ↩︎