This blog runs on Hugo and GitHub Pages, and every post is published in English, Chinese, and Japanese. The whole pipeline looks like this:
- Write posts in Markdown under
content/posts/ git pushto GitHub- GitHub Actions runs
hugo --minify - The build output is published to GitHub Pages
From hitting save to seeing it live takes about a minute.
Writing a new post#
Each post is three files sharing one base name, with the language code before the extension:
content/posts/some-title.en.md
content/posts/some-title.zh.md
content/posts/some-title.ja.mdHugo links them together automatically, so the language switcher in the header jumps between versions of the same post rather than dumping you back on the home page.
Code blocks get syntax highlighting:
def greet(name: str) -> str:
return f"Hello, {name}!"Tables, blockquotes, images — all the usual Markdown works.
Images go in
static/, and you reference them as/image-name.png.
Previewing locally#
hugo server -D starts a local server with hot reload, so you can see changes as you type. Push once it looks right.