Going further3 of 5

Packs

Add features to your site, like questions and answers, a gallery or opening hours. Packs carry no code, so adding one can't put your site at risk.

5 min read

On this page

Prefer to watch? The packs tutorial adds a questions and answers section from start to finish, in three minutes.

On WordPress, features come from plugins. On HotDog, they come from packs. A pack is a set of ready-made sections, page layouts and styles. Adding one copies its files into your site, where they're yours: reviewed, versioned and published like everything else.

Why no code

WordPress plugins run with your whole site's rights, and that's where most WordPress break-ins start. A pack can't hold JavaScript or anything else that runs: its templates go through the same escaping, checks and security policy as your own. And nothing updates behind your back: a new version is a change you see before it's published.

The packs that come with HotDog

Pack What it adds
author-box Who wrote an article, at its end: a photo or initial, their name and role, a short bio and their links, from data/authors.yaml. A site with one writer needs no front matter.
breadcrumbs A "Home › Articles › This page" trail above a page's title, so visitors can find their way back up. Search engines get the trail too, and show it in results.
calendar Events, an upcoming-events section and a calendar feed people can subscribe to. See Events.
changelog Release notes: a page per release, every release on one page, a feed to follow, and a "What's new" section. Security fixes and breaking changes are marked.
coming-soon A holding page for before launch or during maintenance: your name, a headline, when you'll open, a few words and a sign-up form, with no menu. Give the home page layout: holding until launch day.
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. See Forms.
directory A listing of businesses, members or places, grouped by category, with a page each: address and map link, phone, email and website.
docs A documentation section: a sidebar that nests as deep as you need, a breadcrumb, "On this page", part pages, and previous and next links. It can live at the root of a docs site of its own. See MkDocs for bringing one in.
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.
glossary Terms and what they mean, A to Z, with a row of letters to jump with. Each term has its own link, and search engines get the list.
jobs Job openings with closing dates. Closed ones leave the list by themselves.
link-in-bio One page for the link in a social profile: your picture, a line about you and big buttons to everywhere else, with no menu. No link service counting your visitors.
logo-wall A grid of logos for customers, sponsors or "as seen in", optionally in gray until pointed at.
location-and-hours Your address, a map link, phone, email and opening hours.
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 and others.
podcast Episodes with a player, and the feed podcast apps subscribe to.
portfolio Projects with a cover, details and pictures.
recipes Ingredients, steps, times and servings.
related-posts At the end of an article, the ones that share the most tags with it.
reviews Customers' star ratings with the average, as a section or under a product. A product's rating also goes to search engines. Only publish reviews people really wrote.
series Articles in parts: "Part 2 of 5", every part listed, and links to the previous and next part. Give the articles the same series: in their front matter.
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 opens your payment provider's checkout.
status-page Whether each of your services is working, an overall line, open and past incidents with a page each, and a feed to follow. It changes when you publish.
table-of-contents A long page's headings, linked, at its top.
tables A table from a spreadsheet: save it as CSV into data/, and the table updates when you save the sheet again. It has a caption and row headings, and it scrolls sideways on phones instead of squashing.
team A page per person, and a list of everyone.
testimonials Quotes from customers, with a name and a role.
timeline Dates down a line, with what happened at each: a history, a project's milestones, the order of a day.
videos A video library from your own files: a page per video with captions and a transcript, a list, a feed and a "Latest videos" section. Nothing from YouTube, so nothing tracks your visitors.

A few of them on the same site:

The location-and-hours pack: an address with a map link and the opening hours, with the gallery pack below it

The team pack: three people, each with a photo or their initial, a name and a role

The menu-and-prices pack: a bakery's price list in groups

The recipes pack: a recipe page with its picture, times and servings

The contact-forms pack: a quote request form beside the bakery's email, phone, address and when it answers

The tables pack: a price list from a spreadsheet, with a caption, the bread names as row headings and the prices lined up on the right, and the opening hours below it

The breadcrumbs and series packs on an article: a Home, Articles trail above the title, and a box saying Part 2 of 3 in Sourdough basics, listing the three parts with links to the previous and next one

The author-box pack: Written by Sam Rivera, head baker, with an initial in place of a photo, a one-line bio and links to Mastodon and a website

The reviews pack: 4.7 out of 5 from 3 reviews, with three review cards, each with stars, what the customer said, their name and the month

The timeline pack: How we got here, four years down a line, each with a title and a sentence

The glossary pack: Baking words, a row of letters A, B, C, L and S, then the terms under each letter with what they mean

The directory pack: Main Street businesses grouped into Food, Health and Shops, each with a line about them, a phone number and a website

The videos pack: three videos with their posters, lengths, titles and dates

The status-page pack: Some things aren't working as they should, an incident being watched, and four services, working, partly working or under maintenance

The link-in-bio pack: a round picture, the bakery's name and a line about it, and four big buttons, the first highlighted

The coming-soon pack: Fresh bread, coming to Elm Street, Opening March 1, 2027, and a sign-up form

The changelog pack: release notes, newest first, with the security fix and breaking changes marked and the notes grouped under labels

Each pack's notes, shown when you add it, say how to use it. Every pack also has a README in HotDog's packs folder.

Search engines. The faq, location-and-hours, team, recipes, jobs and shop packs also tell search engines what the page is (questions and answers, a business, a person, a recipe, a job, a product), and the breadcrumbs pack tells them where it sits on your site; the glossary, videos and reviews packs describe terms, videos and a product's rating. Search engines use that for richer results, and you don't have to do anything for it.

Add one

In your site's folder:

hotdog-cms pack add faq

hotdog-cms pack add faq: it installed two files, and printed how to use the section

Then put its section on a page, in the editor's section library or in the page's front matter, as its notes say. Commit the new files and the change to site.yaml, ideally through a review.

Command What it does
hotdog-cms pack list The packs in your site, and the ones that come with HotDog.
hotdog-cms pack add faq Add a pack that comes with HotDog.
hotdog-cms pack add ../notice-pack Add one from a folder.
hotdog-cms pack add https://git.example.org/packs/[email protected] Add one from a git repository, at a version.
hotdog-cms pack remove faq Take a pack's files out.
hotdog-cms pack check ../notice-pack What a pack would install, or what's wrong with it.
  • Running add again with a newer version upgrades it.
  • A file already in your site is never overwritten, unless you add -force.
  • In the editor, a pack's sections appear in the section library, marked with the pack's name.

Started your site before HotDog CMS 0.2? For the search engine data, add this line to partials/schema.html:

{{ range pageData . }}<script type="application/ld+json">{{ . }}</script>{{ end }}

Make your own

A section you've built for one site can become a pack for all of them. Make your own pack goes through it step by step.

↑↓ moveEnter openEsc close