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:
- First
- Second
- Third
Ordered:
- Write the post in
content/posts/ - Save the file
- Refresh the preview
Nested:
- Fruit
- Apple
- Orange
- Dairy
- Milk
Tasks:
- Draft
- Publish
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
| Syntax | Renders as |
|---|---|
**bold** | bold |
*italic* | italic |
`code` | code |
Rule
Three dashes on their own line:
Picture
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.
The footnote marker in the paragraph jumps here. ↩︎