jwogrady Working notes on tools, and why they earn their place

The publish loop

Five commands. Everything else is writing.

New entry

hugo new posts/what-i-learned-today.md

Fills the front matter from archetypes/posts.md — tags, archives, citation handle, description. Three things still need hand-editing: tags, the resolves/aliases number, and draft.

For an entry with its own image, make it a page bundle instead:

mkdir content/posts/my-entry
hugo new posts/my-entry/index.md
# drop images in content/posts/my-entry/ alongside index.md

A bundle is what lets the theme resize and convert images. It is the difference between shipping a 1.7 MB PNG and a 37 KB WebP.

Preview

hugo server -D

-D includes drafts. Without it a draft = true entry silently does not exist — the page is not built and the index does not list it. Live at http://localhost:1313/.

Publish

Set draft = false, then commit and push. The deploy is whatever the host does on push; nothing is built by hand.

Check before pushing

hugo --buildDrafts        # does it build at all
hugo                      # does it build without drafts

The second one matters. An entry that renders locally under -D and vanishes in production is the most common way to “publish” nothing.