7. Tools content
Date: 2026-11-21
Status
Accepted. Implemented in the change that adds the Tools collection, with the
tests in tests/example_site.rs and the example tool files under
examples/basic/tools. The tools design carries the
format and the link rules.
Context
The old site at yourpalryan.com curated a Tools collection. It had an index page and one page per tool, each with a brand, a short review, a direct purchase link, and an updated date. Each old file held only a title and a link, with the brand as a level two heading in the body, and each entry carried its own affiliate link. Changing the identifier meant editing every file.
Listsome currently discovers and renders one kind of content. discover_projects
walks projects/<slug>/index.md, and the generator writes project pages, an
index, feeds, and taxonomy pages from that one list. There is no tools/
directory and no /tools page.
Decision record 0004 specified two things relevant to this proposal. Its tool
list extraction turns list items under a ## Tools heading into a checklist
inside a project page. Issue #79 holds that work, and it’s a different feature
from a collection of tool pages. Its affiliate enrichment section described
rewriting vendor links with configured tags. Issue #73 cut that feature, and
decision record 0004’s Corrections say the build doesn’t include it. This
proposal brings the idea back in a narrower place.
Decision
Listsome gains a second kind of content, Tool, alongside Project.
- A tool lives in
tools/<slug>/index.md. Required frontmatter istitleandproduct_url. Optional frontmatter isslug,brand,description,affiliate, andupdated_at. With nodescription, the listing uses the first paragraph of the body. The body is standard CommonMark. - The site owner configures one affiliate identifier per platform in
listsome.toml, under[affiliates.amazon]with atagfield. A missing table means no rewriting. An empty tag or an unknown key is a configuration error that names the field. - Listsome resolves each product link at build time. When the product URL
points at a known Amazon storefront, the build sets the
tagparameter, replaces a tag already there, keeps the other parameters and the fragment, and marks the link as sponsored. A per tool value can opt out withaffiliate: falseor supply a fixed URL. - Link resolution stays a pure function over the product URL, the per tool value, and the configuration. It uses a URL parser, is idempotent, and works from a fixed list of Amazon hosts rather than a host prefix.
- Every affiliate link carries
rel="sponsored nofollow". The generated pages show a disclosure before the first affiliate link, with wording the site owner can replace under[affiliates]. - The build writes
/tools/and/tools/<slug>/index.html. The header gains a Tools link when the build finds at least one tool. Tools stay out of the Atom feed and the webmention manifest. - A tool file that fails to parse earns a warning that names its path. A tool link with a short Amazon URL earns a warning that names the tool, since a short link can’t carry a configured tag.
- Affiliate rewriting for project bodies, materials, and downloads stays out of scope. The first release recognizes Amazon alone, and tools carry no images, categories, tags, or drafts.
Consequences
Positive:
- The maker writes an Amazon identifier once, and a change to it applies to every tool on the next build.
- The product URL in a tool file is the real product page, so it still works when affiliate settings change or disappear.
- The generated links and the disclosure make the commercial relationship visible to readers and to tools that inspect the page.
- The new content kind reuses the existing parser, renderer, and snapshot approach, so the work stays small.
Neutral:
- The configuration shape allows a second platform later, though the code recognizes only Amazon until a new decision extends it.
- Tools have their own pages and aren’t part of the feed, which keeps a curated collection separate from dated posts.
Negative:
- Migrating the old site needs a manual step. The owner replaces each short Amazon link with its canonical product URL so the build can add a tag.
- A second content kind means a second discovery path, a second parser, two more templates, and more snapshot files.
- Disclosure wording is a setting, so a site owner can remove text that the Federal Trade Commission would expect to see. The default sentence is the one that ships.
- The host list needs a code change when Amazon opens another storefront.
Corrections: purchase options and tags
Decision record 0010 replaces the required product_url field with an ordered
affiliate list. Each entry carries a title and a URL. An Amazon storefront
receives the configured tag, and other URLs print as written. Listsome marks
every option sponsored. Listsome dropped the affiliate: false opt-out.
Tools also carry images and tags now, despite the first release excluding
both. Tool tags live under /tools/tags/ and stay separate from the shared
project and note taxonomy.