From 56d6dbbfc3c7cb82eadd20b55c89f379abd394b5 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Wed, 14 Oct 2026 13:40:50 -0700 Subject: [PATCH] Nine packs: the rest of the list reviews (star ratings with the average, as a section or under a product, which then gets AggregateRating), glossary (A to Z with a letter row, each term linkable, DefinedTermSet), logo-wall (a still grid, muted logos become light outlines in dark mode, white tiles on request), videos (a library from your own files: page per video with captions and transcript, list, feed, Latest videos section, VideoObject), directory (entries grouped by category with a page each), link-in-bio (one page of big buttons, no menu), status-page (components from data/status.yaml, incidents with a feed), coming-soon (a holding page with a launch date and a form, no menu) and timeline (dates down a line). Template functions: sortBy, ratings and stars. formatDate takes a date with a time, as front matter's date: does, and now is in the site's timezone. A layout can leave out the site's menu by redefining nav, but only with a non-empty body: Go keeps the old template when the new one is empty. --- docs/packs.md | 26 ++- docs/themes.md | 7 + internal/build/funcs.go | 22 ++- internal/build/packfuncs_test.go | 92 +++++++++ internal/build/schema.go | 195 +++++++++++++++++++ internal/packs/bundled_test.go | 84 ++++++++ internal/site/load.go | 4 + packs/coming-soon/LICENSE | 21 ++ packs/coming-soon/README.md | 10 + packs/coming-soon/assets/coming-soon.css | 10 + packs/coming-soon/layouts/holding.html | 16 ++ packs/coming-soon/pack.yaml | 26 +++ packs/directory/LICENSE | 21 ++ packs/directory/README.md | 8 + packs/directory/assets/directory.css | 19 ++ packs/directory/layouts/directory.html | 14 ++ packs/directory/layouts/listing.html | 17 ++ packs/directory/pack.yaml | 33 ++++ packs/directory/partials/listing-card.html | 9 + packs/glossary/LICENSE | 21 ++ packs/glossary/README.md | 11 ++ packs/glossary/assets/glossary.css | 15 ++ packs/glossary/pack.yaml | 23 +++ packs/glossary/sections/glossary.html | 35 ++++ packs/link-in-bio/LICENSE | 21 ++ packs/link-in-bio/README.md | 10 + packs/link-in-bio/assets/link-in-bio.css | 14 ++ packs/link-in-bio/layouts/links.html | 17 ++ packs/link-in-bio/pack.yaml | 24 +++ packs/logo-wall/LICENSE | 21 ++ packs/logo-wall/README.md | 8 + packs/logo-wall/assets/logo-wall.css | 20 ++ packs/logo-wall/pack.yaml | 21 ++ packs/logo-wall/sections/logos.html | 29 +++ packs/packs.go | 2 +- packs/reviews/LICENSE | 21 ++ packs/reviews/README.md | 11 ++ packs/reviews/assets/reviews.css | 11 ++ packs/reviews/pack.yaml | 30 +++ packs/reviews/partials/review-item.html | 6 + packs/reviews/partials/review-summary.html | 4 + packs/reviews/partials/reviews.html | 9 + packs/reviews/sections/reviews.html | 28 +++ packs/status-page/LICENSE | 21 ++ packs/status-page/README.md | 12 ++ packs/status-page/assets/status-page.css | 29 +++ packs/status-page/layouts/incident-list.html | 10 + packs/status-page/layouts/incident.html | 14 ++ packs/status-page/pack.yaml | 47 +++++ packs/status-page/partials/incident-row.html | 5 + packs/status-page/partials/status-label.html | 2 + packs/status-page/sections/status.html | 32 +++ packs/timeline/LICENSE | 21 ++ packs/timeline/README.md | 7 + packs/timeline/assets/timeline.css | 13 ++ packs/timeline/pack.yaml | 19 ++ packs/timeline/sections/timeline.html | 37 ++++ packs/videos/LICENSE | 21 ++ packs/videos/README.md | 11 ++ packs/videos/assets/videos.css | 14 ++ packs/videos/layouts/video-list.html | 9 + packs/videos/layouts/video.html | 11 ++ packs/videos/pack.yaml | 35 ++++ packs/videos/partials/video-card.html | 8 + packs/videos/partials/video-player.html | 9 + packs/videos/sections/videos.html | 17 ++ 66 files changed, 1441 insertions(+), 9 deletions(-) create mode 100644 internal/build/packfuncs_test.go create mode 100644 packs/coming-soon/LICENSE create mode 100644 packs/coming-soon/README.md create mode 100644 packs/coming-soon/assets/coming-soon.css create mode 100644 packs/coming-soon/layouts/holding.html create mode 100644 packs/coming-soon/pack.yaml create mode 100644 packs/directory/LICENSE create mode 100644 packs/directory/README.md create mode 100644 packs/directory/assets/directory.css create mode 100644 packs/directory/layouts/directory.html create mode 100644 packs/directory/layouts/listing.html create mode 100644 packs/directory/pack.yaml create mode 100644 packs/directory/partials/listing-card.html create mode 100644 packs/glossary/LICENSE create mode 100644 packs/glossary/README.md create mode 100644 packs/glossary/assets/glossary.css create mode 100644 packs/glossary/pack.yaml create mode 100644 packs/glossary/sections/glossary.html create mode 100644 packs/link-in-bio/LICENSE create mode 100644 packs/link-in-bio/README.md create mode 100644 packs/link-in-bio/assets/link-in-bio.css create mode 100644 packs/link-in-bio/layouts/links.html create mode 100644 packs/link-in-bio/pack.yaml create mode 100644 packs/logo-wall/LICENSE create mode 100644 packs/logo-wall/README.md create mode 100644 packs/logo-wall/assets/logo-wall.css create mode 100644 packs/logo-wall/pack.yaml create mode 100644 packs/logo-wall/sections/logos.html create mode 100644 packs/reviews/LICENSE create mode 100644 packs/reviews/README.md create mode 100644 packs/reviews/assets/reviews.css create mode 100644 packs/reviews/pack.yaml create mode 100644 packs/reviews/partials/review-item.html create mode 100644 packs/reviews/partials/review-summary.html create mode 100644 packs/reviews/partials/reviews.html create mode 100644 packs/reviews/sections/reviews.html create mode 100644 packs/status-page/LICENSE create mode 100644 packs/status-page/README.md create mode 100644 packs/status-page/assets/status-page.css create mode 100644 packs/status-page/layouts/incident-list.html create mode 100644 packs/status-page/layouts/incident.html create mode 100644 packs/status-page/pack.yaml create mode 100644 packs/status-page/partials/incident-row.html create mode 100644 packs/status-page/partials/status-label.html create mode 100644 packs/status-page/sections/status.html create mode 100644 packs/timeline/LICENSE create mode 100644 packs/timeline/README.md create mode 100644 packs/timeline/assets/timeline.css create mode 100644 packs/timeline/pack.yaml create mode 100644 packs/timeline/sections/timeline.html create mode 100644 packs/videos/LICENSE create mode 100644 packs/videos/README.md create mode 100644 packs/videos/assets/videos.css create mode 100644 packs/videos/layouts/video-list.html create mode 100644 packs/videos/layouts/video.html create mode 100644 packs/videos/pack.yaml create mode 100644 packs/videos/partials/video-card.html create mode 100644 packs/videos/partials/video-player.html create mode 100644 packs/videos/sections/videos.html diff --git a/docs/packs.md b/docs/packs.md index fb7a35a..3f38e89 100644 --- a/docs/packs.md +++ b/docs/packs.md @@ -35,18 +35,28 @@ Content-Security-Policy as the site's own. subscribe to (see [events.md](events.md)); - **changelog**: release notes, a page per release and all of them on one page, a feed to follow and a "What's new" section; + - **coming-soon**: a holding page for before launch or during + maintenance, with when you'll open and a sign-up form; - **contact-forms**: ready-made forms for a quote, a booking and a mailing list, and a section that puts any form beside your email, phone and address; + - **directory**: a listing of businesses, members or places, grouped + by category, with a page each; - **docs**: a documentation section with a sidebar, part pages and previous/next links, in the order `data/docs-nav.yaml` gives; - **downloads**: files to download, with their type and size; - **faq**: questions that open to show their answers; - **gallery**: a grid of pictures that open full size, with no script; + - **glossary**: terms and what they mean, A to Z, each with its own + link; - **jobs**: openings with closing dates; closed ones leave the list by themselves; + - **link-in-bio**: one page of big buttons, for the link in a social + profile; - **location-and-hours**: address, map link, phone, email and opening hours, from `data/location.yaml`, as a section or a partial; + - **logo-wall**: a grid of logos, for customers, sponsors or "as seen + in"; - **menu-and-prices**: a price list in groups, and plans side by side; - **payment-links**: buy, book and donate buttons that open your payment provider's own checkout (Stripe, PayPal, Square, Ko-fi, Liberapay…); @@ -57,24 +67,32 @@ Content-Security-Policy as the site's own. - **recipes**: ingredients, steps, times and servings; - **related-posts**: at the end of an article, the ones sharing the most tags with it; + - **reviews**: star ratings from customers, with the average, as a + section or under a product; - **series**: articles in parts, with "Part 2 of 5", every part listed and links to the previous and next part; - **share-links**: plain share links for Mastodon, Bluesky, LinkedIn and email, with no tracking; - **shop**: a product catalog with a page per product, each Buy button opening your payment provider's checkout (no cart); + - **status-page**: whether your services are working, open and past + incidents, and a feed; - **table-of-contents**: a long page's headings, linked, at its top; - **tables**: tables from a spreadsheet saved as CSV (or YAML), with a caption and row headings, that scroll on phones; - **team**: a page per person, a list of everyone and a section; - - **testimonials**: quotes with a name and a role. + - **testimonials**: quotes with a name and a role; + - **timeline**: dates down a line, with what happened at each; + - **videos**: a video library from your own files, with a page per + video, a feed and a "Latest videos" section. - `-site` picks the site folder (default: the current one). **Search engines.** The faq, location-and-hours, team, recipes, jobs and shop packs are also written as schema.org data (FAQPage, LocalBusiness, Person, -Recipe, JobPosting, Product), and so is the breadcrumbs pack's trail -(BreadcrumbList, on every page once the pack is installed), which search -engines use for richer results. A pack can't carry the +Recipe, JobPosting, Product), and so are the breadcrumbs pack's trail +(BreadcrumbList, on every page once the pack is installed), a glossary +section's terms (DefinedTermSet), a video page (VideoObject) and a product's +reviews (AggregateRating), which search engines use for richer results. A pack can't carry the `