Guides
Guides
Creating a Post
Scaffold
Create a file under the appropriate category subdirectory:
_posts/journals/— personal journal_posts/learning-notes/— technical learning notes_posts/technicals-go/— Go-specific technical_posts/thoughts/— opinion pieces
Frontmatter
---
layout: post
title: Post Title Here
date: YYYY-MM-DD HH:MM:SS +0000
highlighted: false # true = featured on index page
categories:
tags: []
series: Series Name # groups related posts; leave blank if standalone
---
seriesmust be consistent across entries in the same group- Drafts in
_drafts/use identical frontmatter
Rich Blocks
Rich blocks are authored as inline HTML with data-rich-block attributes. They are static-first (render without JS) and enhanced by Preact islands at runtime.
Available blocks
| Block | Attribute | Behavior |
|---|---|---|
| Quote | data-rich-block="quote" |
Warm-accent styled callout |
| Headline image | data-rich-block="headline-image" |
Click-to-open full-size in new tab |
| Inline gallery | data-rich-block="inline-gallery" |
Grid (1-2 images), carousel (3+) |
| Download card | data-rich-block="download" |
File download tile (row of cards) |
Adding a new rich block
- Add the component to DESIGN.md (Components section) with stable ID and usage notes
- Create island module in
assets/js/components/ - Register its
run...Enhancementscall inassets/js/runtime.js - Author the HTML contract in post Markdown
- Add visual contracts and spacing to
style.scss
Inline gallery specifics
- 1-2 images: standard grid
- 3+ images (or
data-layout="carousel"): horizontal multi-visible strip with left/right controls - Controls appear only when items overflow available width
Code Highlighting
- Renderer: Shiki via CDN (post pages only,
#postselector) - Theme:
min-light - Supported languages:
go,javascript,typescript,bash,python,json,yaml,plaintext - Fallback: Server-rendered Rouge highlighting remains readable if CDN fails
Language normalization applies aliases and legacy rules before falling back to plaintext. See DESIGN.md for the full normalization ruleset.
Series
Group related posts with a consistent series value in frontmatter. The _includes/preprocess_series.html include handles series grouping on post pages. No special configuration needed — just keep the value identical.
Common Gotchas
-
seriesmust match exactly. “Go Patterns” and “go-patterns” are different series. Be consistent. -
Rich blocks need
style.scssrules too. The Preact island handles runtime behavior, but visual contracts (spacing, colors) live instyle.scss. Both are needed. -
Drafts use same frontmatter as posts. Don’t strip fields when moving from
_drafts/to_posts/. -
highlighted: trueon too many posts dilutes the index page. Reserve for genuine highlights. -
Shiki CDN only activates on
#post. Code blocks on listing pages, about, or garage use Rouge server-side highlighting only. -
DESIGN.md governs all visual changes. New components, color changes, spacing adjustments must be registered there first. See Design Governance in AGENTS.md.