Fieldnotesv1.1.2

Posts and pages

Sections, front matter, drafts, the menu, and pages like About.

Sections

Each folder in content/ is a section: posts/, trips/, projects/, or any name you like. A section has its own page listing its posts as cards, newest first. Give it a title with an _index.md:

content/posts/_index.md
---
title: "Posts"
---

Optional text above the list.

A post’s front matter

md
---
title: "Across the Pyrenees"
date: 2026-06-14
lastmod: 2026-07-02
summary: "Eight days from the Atlantic to the Mediterranean, mostly uphill."
draft: false
---
KeyWhat it does
titlethe post’s heading and name everywhere
datewhen it was written; sorts the lists, newest first
lastmodwhen it was last changed: more than a day after date, the post says “updated” with this date
summarythe text on the post’s card; without it, the beginning of the post
drafttrue keeps the post off the published site; hugo server -D shows it, marked “Draft”
descriptionthe description for search engines, if it should differ from the summary
mathtrue turns on maths for this post (Maths and code)
stylea look of its own for this page (Presets)

All keys are in the front matter reference.

A post with files: page bundles

A post with photos, a map or other files is a folder with an index.md:

text
content/posts/across-the-pyrenees/
├── index.md
├── col-du-tourmalet.jpg
└── route.geojson

Link the files by their names from index.md. Hugo publishes the folder’s files with the post.

The menu

The links in the header are your site’s main menu, in hugo.toml. pageRef is a page’s path in content/:

hugo.toml
[[menus.main]]
  name = "Posts"
  pageRef = "/posts"
  weight = 10
[[menus.main]]
  name = "Trips"
  pageRef = "/trips"
  weight = 20
[[menus.main]]
  name = "About"
  pageRef = "/about"
  weight = 30

The link of the section you’re in is marked. For a link to another site, use url = "https://…" instead of pageRef.

Pages outside sections

A file at the top of content/, like content/about.md, is a page of its own: no date, not in any list. Use it for About, a CV, an imprint.

Feeds

The home page and every section have an RSS feed (/index.xml, /posts/index.xml), linked in the page’s head, so feed readers find them. An rss social icon can point to it.