Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Site Configuration

A site reads its settings from listsome.toml in the site root. listsome init writes a working file with placeholders, and every command loads it from the directory you run from. The -C flag looks like an override and isn’t one, as the section at the end of this page explains.

This reference lists every field the parser reads, the default it falls back to, and what the field changes. This page marks the fields that Listsome accepts and then ignores, because a config that looks honored and does nothing is worse than one that says so. The section at the end collects every one of them.

A complete example

[site]
name = "My Project Site"
description = "Step-by-step guides for things I built"
author = "Ryan"
url = "https://projects.example.com"
language = "en"
about = "https://example.com/about"
email = "you@example.com"
source_repo = "https://codeberg.org/ryan/projects"
mastodon = "@ryan@mastodon.social"

[author]
name = "Ryan"
note = "I make things and write about them."

[[author.links]]
label = "Codeberg"
url = "https://codeberg.org/ryan"

[build]
output_dir = "./output"
drafts = false
items_per_page = 15

[build.images]
enabled = true
max_content_width = 1400
max_thumb_width = 700
convert_to_webp = false
webp_quality = 80.0
jpeg_quality = 100
palette = ["#1a1a2e", "#16213e", "#ff6b81", "#0f3460"]

[webmention]
enabled = true
endpoint = "https://webmention.io/projects.example.com/webmention"
approval = "auto_verified"

[affiliates]
disclosure = "Some links earn me a commission at no cost to you."

[affiliates.amazon]
tag = "yourtag-20"

[dev]
base_url = "http://localhost:8080"
port = 8080

[deploy]
host = "your-server.local"
user = "deploy"
path = "/var/www/site"
port = "3004"

[site]: site metadata

Three fields have no default, so the file fails to parse without them: name, description, and author.

FieldDefaultWhat Listsome does with it
namenone, requiredPrints it in the header, the tab title, and the feed title
descriptionnone, requiredPrints it under the site name and writes the feed subtitle
authornone, requiredWrites the feed byline and the footer copyright, and listsome new copies it into frontmatter
urlnoneSets the absolute base for links, the feed, and webmention targets
languageenWrites the lang attribute on the <html> element
aboutnoneWraps the author name in a link, which marks your h-card identity
emailnoneAdds an email to the feed
source_repononeReads it and keeps it in the model, and no template prints it

url deserves a setting of its own: without it, absolute URLs in the feed and the webmention manifest fall back to dev.base_url and then to http://localhost:8080. See how Listsome picks a base URL.

Social handles

Handles for the sharing link live directly under [site], not in a nested table:

[site]
mastodon = "@ryan@mastodon.social"
FieldDefaultWhat Listsome does with it
mastodonnoneBuilds the Share on Mastodon link on each project page
pixelfednoneReads it, keeps it in the model, and prints nothing
peertubenoneReads it, keeps it in the model, and prints nothing
blueskynoneReads it, keeps it in the model, and prints nothing

Only the Mastodon handle drives a template today. The other three need a share target before they earn their place, so a site that sets them sees no change.

[author]: the author profile

The [author] table publishes an h-card, the IndieWeb name for a profile that other sites can read. Listsome renders a compact card on the landing page and an expanded one at /about/ when the author supplies a long bio. A site with no [author] table keeps its current pages.

[author]
name = "Ryan Parsley"
photo = "/assets/avatar.jpg"
note = "I make things and write about how they went."
about = """
I build small tools and write about what I learn along the way.

You can reach me at [ryan@example.com](mailto:ryan@example.com).
"""
location = "Somewhere, USA"
pronouns = "he/him"
url = "https://example.com"

[[author.links]]
label = "Codeberg"
url = "https://codeberg.org/ryan"
FieldDefaultWhat Listsome does with it
namesite.authorPrints the author name in the h-card
photononeAdds a u-photo to the card
notenonePrints a short p-note on the landing page
aboutnoneRenders Markdown and writes /about/ when set
locationnonePrints a p-location
pronounsnonePrints a p-pronouns line
urlsite.urlSets the card’s u-url and u-uid
linksemptyAdds identity links, each rel=me unless it sets rel

Listsome doesn’t print an email address in either h-card. The site.email field still supplies the feed address.

Listsome turns a photo that starts with ./assets/ into a site absolute path. The author can also write a full URL. The footer keeps using site.author, so a different display name in [author] changes only the h-card.

An unknown key under [author] or under one of its links fails the build and names the key. That keeps a typo from looking like a setting that works.

[build]: build settings

FieldDefaultWhat Listsome does with it
output_dir./outputWrites the generated site here
draftsfalseIncludes status: draft projects in the build
items_per_page0Splits every listing into pages, 0 means one long page
default_project_imagebuilt-in crossed toolsImage shown on project cards with no hero
themedefaultReads it and ignores it, one theme ships
parallel_jobsCPU countReads it and ignores it, the build runs one project at a time
incrementaltrueReads it and ignores it, every build regenerates everything
base_urlnoneReads it and ignores it, production URLs come from site.url

Every project card gets an image so the grid stays aligned. A project’s hero wins. With no hero, Listsome uses default_project_image, and the built-in crossed hammer and wrench at /assets/default-project.svg is the last fallback. A site can supply its own file at that path to override the built-in image.

items_per_page needs a number greater than zero before any listing paginates. It splits the home page, the notes index, the tools index, the tool tag pages, and the site-wide tag and category pages. A listing writes its first page to its own index.html, then page/2/index.html and onward: the notes go to output/notes/page/2/index.html, and a tag page to output/tags/<tag>/page/2/index.html. A listing that fits on one page writes only its own index.html and prints no page links. The Atom feeds always carry every entry.

drafts also has a per-command override: listsome build --drafts and listsome serve --drafts publish drafts for that run without touching the file.

[build.images]: image processing

The build resizes and re-encodes images in each project’s assets/ directory.

FieldDefaultWhat Listsome does with it
enabledtrueTurns the whole image pass on or off
max_content_width1400Caps the width of images in a project body
max_thumb_width700Caps the width of listing thumbnails
convert_to_webpfalseWrites a WebP copy of each jpg and png file
webp_quality80.0Sets the WebP encoder quality
jpeg_quality100Sets the jpg encoder quality
paletteListsome colorsHex colors used by generated placeholder images

A project with no hero gets a generated 1200 by 400 pixel banner from these colors. The project slug seeds a ChaCha8Rng, and tiny-skia draws a mirrored grid, so the same slug always gets the same image and Listsome needs no JavaScript. Set [build] default_project_image to use one fixed image instead, and Listsome writes no generated images. A project’s own hero still wins over both.

Listsome treats a file as a thumbnail when its name carries thumbnail, and that’s the only case where max_thumb_width applies. Set enabled = false to copy assets as-is, which is what you want when a screenshot has to stay pixel-exact.

WebP output is off by default, so the roadmap line about WebP conversion describes a capability, not a default. Turn it on and check that your host serves the right media type.

[webmention]: webmention settings

A webmention is a notification that another site linked to one of your projects. Listsome receives them through a service such as webmention.io, stores them in a local cache, and renders the ones it approves. Sending happens on deploy.

FieldDefaultWhat Listsome does with it
enabledtrueLets listsome deploy send mentions for outbound links
endpointa placeholder URLSets the service it fetches from
approvalauto_verifiedDecides how much review an incoming mention needs
tokenemptyReads it and ignores it, fetch sends no authentication
notifyfalseReads it and ignores it, no email notification path exists

The endpoint that listsome init writes points at yourdomain.com. listsome webmention fetch refuses to use it, because webmention.io answers an unknown domain with an empty inbox and an empty inbox looks the same as a site with no mentions. Replace it with your own endpoint before you fetch.

Approval modes

listsome webmention fetch re-reads the page that mentioned you and records two facts: whether that page still links to your project, and whether the mention may appear on your site. approval decides how much of the first fact the command acts on.

ValueBehavior
auto_verifiedPublishes a mention once its source page confirms it, and holds the rest for a decision
manualHolds everything until you run listsome webmention approve
offPublishes every mention the moment it arrives, and skips verification

A fetch only ever grants approval. A source page that goes missing for a minute shouldn’t undo a decision you already made. Taking a mention down is your job:

RUST_LOG=info listsome webmention pending
listsome webmention approve https://blog.example/post
listsome webmention reject https://spam.example/post
RUST_LOG=info listsome webmention show my-project
listsome build

pending prints what waits for a decision, show prints every mention of one project with its state, and build renders the approved ones. reject remembers the decision, so the next fetch leaves that mention out instead of fetching it again, and approve on a rejected source reverses it. Both commands write .cache/webmentions.json, and the next build publishes the change.

Listsome adds an Amazon Associates tag to product links in tool entries. The site owner writes the tag once here, and each build applies it to tool files whose purchase-option url points at a known Amazon storefront. A URL that doesn’t qualify renders as written.

FieldDefaultWhat Listsome does with it
affiliates.disclosureA built in sentencePrints before the tool list and beside each affiliate link
affiliates.amazon.tagNoneSets the tag parameter on Amazon product links

An empty affiliates.amazon.tag fails the build and names the field. A key under [affiliates] that Listsome doesn’t recognize also fails, so a typo can’t look like a setting that works. With no [affiliates.amazon] table, the build leaves every product link alone.

A short link on amzn.to already carries its own destination, so Listsome leaves it as written and warns that Listsome can’t apply the configured tag. The tools design explains how a per tool override works.

[dev]: development settings

FieldDefaultWhat Listsome does with it
port8080Binds the dev server to this port
base_urlnoneAnswers as the base URL when site.url is unset

serve -p beats dev.port, and dev.base_url is only a fallback for builds: a production build wants site.url.

[deploy]: deployment settings

listsome deploy runs rsync over ssh, so it needs all three fields before it starts, and it names the one that’s missing:

FieldDefaultWhat Listsome does with it
hostnone, requiredrsync destination host
usernone, requiredrsync destination user
pathnone, requiredRemote directory that receives output/
portnonePrints a link to the deployed site, nothing more

[fediverse]: syndication settings

Listsome parses this table, and no code reads it. Syndication to the fediverse comes later than everything else on the roadmap, so the shape is here before the behavior:

[fediverse]
enabled = false
mastodon_instance = "https://mastodon.social"
mastodon_token = ""
auto_syndicate = false
default_hashtags = ["#DIY", "#makers"]

Setting enabled = true changes nothing yet. Don’t commit an API token here, either, since no code reads it.

How Listsome picks a base URL

Three places can supply one, and Listsome takes them in this order:

  1. --base-url on listsome build
  2. site.url
  3. dev.base_url
  4. http://localhost:8080

The base URL decides the link in the feed, the id of each feed entry, the source URLs in the webmention manifest, and every absolute link a template writes. A site that publishes without site.url writes a feed full of localhost links.

How Listsome picks an author

listsome new writes the frontmatter author from site.author, so a site that sets the site author gets correct bylines without work. If a project file has no author, the build falls back to Anonymous, and only listsome init reads $USER.

Fields and flags that do nothing yet

Six settings parse, then never reach a template, a command, or the build: build.theme, build.parallel_jobs, build.incremental, build.base_url, webmention.token, and webmention.notify, plus the whole [fediverse] table. Delete them from a config and the build output doesn’t change.

The argument parser reads four flags and drops them before any command runs: -C, -v, -q, and --color. listsome --help prints them, so they look real. Until someone wires them up, keep listsome.toml in the directory you run from and control output through RUST_LOG.