Khalid / Templates / Pantry

Food and recipes template. Pantry

A baking and recipe blog, with the sections of the recipe box as divider tabs, recipes as square index cards with the time and yield on a tear-off ticket, and a recipe page that opens on its facts and its ingredients card, then numbers its method.

Free and open source, built into Khalid.

Start a blog
khalid init blog --template pantry
Run it where you want the blog's folder. It asks for the blog's address, then builds it.

The home page, a post and a phone.

The home page of the Pantry template
The home page
A post in the Pantry template
A post
The home page of the Pantry template on a phone
On a phone

What it shows.

Pantry is a template for a baking and recipe blog. Every recipe shows its time and what it makes on a tear-off ticket, and every recipe page opens on its facts and its ingredients, before the story. It feels like a tidy recipe box on a floury worktop: square index cards, ruled lines and clear weights.

What the front page shows

  1. Your site's name, large, and the tagline under it.
  2. Up to four large numbers from hero_stats, such as how many recipes you have. Nothing shows until you write them.
  3. The recipe box: each category that holds recipes as a divider tab along a cherry line. A category whose posts on the page are all baking notes is left out.
  4. Fresh from the oven: your newest recipe as one wide index card: its picture beside its section, title, summary and its full ticket of four facts. It shows on the first page only.
  5. Recipes: your other recipes as square index cards. Each shows its picture, its section, its title and its ticket with the time and what it makes. On a phone each card is a row: a small square picture beside the section and title, with the ticket under them.
  6. Baking notes: the newest posts without facts as a dated list. notes_count sets how many.
  7. Numbered page links, your call to action as a band, and the newsletter form.

What a post shows

  1. The trail from the home page to the post's section.
  2. The section as a small label, the title, the post's description, the baker with their mark and role, and the date.
  3. The ticket: the four facts in ruled cells under a dashed line, each label small over its value. On wide screens all of this sits beside the lead picture.
  4. The post in one column of about 70 characters, with its ingredients card and its numbered method. On wide screens the contents list sits beside the text, under the picture.
  5. The tags, the share links and the author box.
  6. Related posts as index cards.

Its options.

Set any of these under [template.options]. An option you leave out takes the default shown.

Option Default What it changes
tagline none One line under the site's name on the front page.
notes_count 6 How many baking notes show on the front page, from 0 to 10.
hero_stats none Up to four numbers under the site's name, each written number | what it counts.
logo true The header shows your logo from [brand] logo in place of the site's name.
breadcrumbs true Each page shows the trail of links from the home page to it.
dek true A post shows its description under its title.
updated_note false An updated post says why it was updated, from its updated_note.
cards "image" The shape of the cards on shared pages such as search: image, text, row, compact or ranked.
pagination "numbered" numbered links to each page near this one; pages shows only newer and older.
related_count 3 How many related posts show, from 3 to 10.
contents "side-end" Where a long post's contents go: side-end, side-start, inline, inline-folded or none.
header_search "button" What the header's search does on a served site: button, link or none.
contents_numbers "none" How the contents are numbered: none, numbered or nested.
share "end" Where a post shows its share links: none, top, end or both.
share_networks ["facebook", "whatsapp", "email"] The networks the share links go to, in order.
newsletter "both" Where the newsletter form shows: none, post, home or both.
cta_band "home" Where the band with your call to action shows: none, post, home or both.
cta_button false The header shows your call to action as a button.
topic_tabs false Tabs on the front page, one per topic, each with its four newest posts.
video_section false A row of the newest posts with a video.
podcast_section false A row of the newest posts with a sound player.

Deploy guides.

A free blog on Cloudflare

Build the blog as static pages and serve them on Cloudflare's free plan.

Running Khalid on a server

Run Khalid on your own server, beside your website or at its own address.

The full Pantry guide

Sizes, spacing and every detail, in Khalid's docs.

Run your blog on Khalid.

Free and open source. One program, with SEO built in.