Blog Writing Reference


site author

Use this page as a copy/paste reference when writing posts.

Quick post template

---
title: "Your post title"
toc: true
attribution: your name
permalink: /:basename/
---

One-sentence intro.

## Section heading

Main content here.

Headings and inline styles

# Page title (usually from front matter)
## Main section
### Subsection

Use **bold**, *italic*, and ***bold italic***.
Use inline code like `gpio_set_output(pin)`.
Link to internal pages: [Home](/).
Link to external pages: [GitHub](https://github.com/).

Lists

- First item
- Second item
  - Nested item
- Third item

1. First step
2. Second step
3. Third step

Code blocks

Use a language tag after the opening backticks for syntax highlighting.

```c
#include "gpio.h"

void blink(int pin) {
    gpio_set_output(pin);
}
make clean && make
mytools/mango-run blink.bin

## Callout boxes

Use this pattern:

```markdown
> **Title:** Callout content.
{: .callout-info}

Available callout classes on this site:

  • .callout-info
  • .callout-primary
  • .callout-success
  • .callout-warning
  • .callout-danger
  • .callout-question

Examples:

Info: Helpful context or background.

Warning: Highlight pitfalls or gotchas.

Question: Prompt discussion or reflection.

Blockquotes

> Bare-metal programming means you are in full control of the machine.

Bare-metal programming means you are in full control of the machine.

Tables

| Item | Example | Notes |
|---|---|---|
| Inline code | `` `printf` `` | Monospace text |
| Link | `[Labs](/labs/)` | Internal link |
| Bold | `**important**` | Emphasis |
Item Example Notes
Inline code `printf` Monospace text
Link [Home](/) Internal link
Bold **important** Emphasis

Images

![Short alt text](/_assets/img/cats.jpg)

Short alt text

Horizontal rule

---

Math

Inline math: $2^8 = 256$.

Display math:
$$
\sum_{i=0}^{n-1} 2^i = 2^n - 1
$$

Inline math: $2^8 = 256$.

Display math:

\[\sum_{i=0}^{n-1} 2^i = 2^n - 1\]

Footnotes

Footnotes are supported for references.[^note]

[^note]: This is the footnote text.

Footnotes are supported for references.1

Writing checklist

  • Use a clear title and short intro.
  • Keep section headings descriptive.
  • Prefer short paragraphs and lists.
  • Add alt text for every image.
  • Use callouts only for important highlights.
  • Check all links before publishing.
  1. This is the footnote text.