This post is my own reference. Each section shows a feature rendered live, with the source in a code block above so I can copy it.
Front matter#
---
title: "Title"
summary: "Short summary used on list pages and meta tags"
description: "Used in <meta name=description>; falls back to summary"
date: 2026-05-04
lastmod: 2026-05-04
expiryDate: 2027-01-01
draft: false
slug: "custom-url-slug"
aliases: ["/old-url/"]
categories: ["Reference"]
tags: ["a", "b"]
series: ["My Series"]
series_order: 1
authors: ["derin"]
externalUrl: "https://example.com"
showHero: true
heroStyle: "basic" # basic | big | background | thumbAndBackground
showAuthor: true
showDate: true
showDateUpdated: false
showReadingTime: true
showWordCount: true
showTableOfContents: true
showSummary: true
sharingLinks: ["twitter", "linkedin", "email"]
robotsNoIndex: false
xml: true
---Markdown basics#
Inline#
bold, italic, both, strikethrough, inline code, a link, and a footnote.1
Lists#
- one
- two
- nested
- three
- first
- second
- third
- done
- not done
Blockquote#
Quotes can be nested.
Like this.
Tables#
| Column | Type | Notes |
|---|---|---|
id | int | primary key |
name | text | indexed |
created_at | timestamp | UTC |
Code blocks#
def fib(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return aWith line numbers and highlighted lines:
| |
Raw HTML#
Cmd+K, highlighted, H2O, x2.
Math (KaTeX)#
Add the katex shortcode once anywhere on the page to load KaTeX, then write math with $...$ or $$...$$.
{{< katex >}}Inline: $E = mc^2$.
Display:
$$ \int_{-\infty}^{\infty} e^{-x^2},dx = \sqrt{\pi} $$
Diagrams (Mermaid)#
{{< mermaid >}}
graph LR
A[Idea] --> B{Useful?}
B -- yes --> C[Write post]
B -- no --> D[Forget about it]
C --> E[Publish]
{{< /mermaid >}}
graph LR
A[Idea] --> B{Useful?}
B -- yes --> C[Write post]
B -- no --> D[Forget about it]
C --> E[Publish]
Charts (Chart.js)#
{{< chart >}}
type: 'line',
data: {
labels: ['Jan','Feb','Mar','Apr','May'],
datasets: [{ label: 'Posts written', data: [1,3,2,5,4] }]
}
{{< /chart >}}Blowfish shortcodes#
Alert#
Lead#
Badge#
NewButton#
Visit my portfolioIcon#
Inline:
Keyword / KeywordList#
A
Tabs#
npm install foopnpm add foobun add fooAccordion#
Click to expand
Timeline#
Started blog
2026
Set up Hugo + Blowfish.Wrote first real post
2026
Replaced the demo content.
Article cards (link to other posts)#
{{< article link="/posts/some-other-post/" >}}List of posts as cards#
{{< list cardView=true limit=3 where="Type" value="posts" >}}Embeds#
GitHub repo card:
Gist:
YouTube (lite, lazy-loaded):
Email obfuscation#
Direction#
Color swatches#
Typewriter effect#
Asset-dependent shortcodes (source only)#
These need real files in the post’s bundle (next to index.md) so the source is shown in code blocks rather than rendered. Drop in the asset, then uncomment to use.
Image (page resource):
Figure with caption:
{{< figure
src="feature.png"
alt="Caption-bearing image"
caption="Figures get a caption row underneath."
>}}Gallery:
{{< gallery >}}
{{< galleryItem src="img1.jpg" caption="One" >}}
{{< galleryItem src="img2.jpg" caption="Two" >}}
{{< /gallery >}}Carousel (glob of images in the bundle):
{{< carousel images="gallery/*" >}}Native video:
{{< video src="demo.mp4" autoplay="true" muted="true" >}}Screenshot frame:
{{< screenshot src="ui.png" >}}Code import from a remote file:
{{< codeimporter url="https://raw.githubusercontent.com/example/repo/main/file.py" type="python" >}}Markdown import (compose from fragments):
{{< mdimporter url="fragment.md" >}}Hugo built-ins#
Ref / relref — link by file path, survives renames#
[See another post]({{< ref "/posts/some-other-post" >}})Page resources#
When images, PDFs, or data files live in the post’s bundle directory (next to index.md), reference them by relative name (feature.png), not by URL. Hugo will hash, optimize, and emit them automatically.
Series#
Add to front matter:
series: ["My Series Name"]
series_order: 1Blowfish renders prev/next navigation and a series index page.
Drafts and futures#
hugo ignores draft: true and future-dated content by default. Preview with hugo server -D -F.
Build commands#
hugo server -D # local preview, includes drafts
hugo server -D -F # also future-dated posts
hugo --gc --minify # production build into ./public
hugo new posts/foo/index.mdWhen in doubt, the Blowfish docs are canonical.2