Magazine template. Masthead
A general publication, the safe all-rounder, with the site's name centred over a heavy and a thin rule, a lead story, the latest posts as a grid or a list, headlines by section and a calm reading column.
Free and open source, built into Khalid.
khalid init blog --template masthead
The home page, a post and a phone.
What it shows.
Masthead is a template for a general publication: a magazine, a review or a small paper that covers several subjects. It is the safe all-rounder. Your site's name sits large and centred over a heavy rule and a thin one, the front page leads with one story, and every post keeps to a calm reading column.
What the front page shows
- Your site's name, large and centred, with your menu between a heavy and a thin rule under it.
- Your
tagline, one line in italics. - The lead story: the newest post you marked
featured: true, or your newest post. Its picture, section, title, excerpt, writer and date. In the grid front the text sits beside the picture; in the list front it sits centred above it. - Latest: the next posts,
latest_countof them, in the shapefrontsets. - In the sections: the rest of the page's posts as short lists of headlines, one column per section, each under its section's name.
- Numbered page links, your call to action as a band, and the newsletter form.
If you list home sections in site.toml, each shows under its own rule label in the shape front sets, in place of steps 3 to 5.
What a post shows
- The trail from the home page to the post's section, centred.
- The section as a small capital label, the title, and the post's description under it in italics.
- The writer with their role, and the date.
- The lead picture, wider than the text, with its caption.
- The post in one column about 66 characters wide, the first paragraph a little larger, and a small square in your accent colour after the last.
- The tags, the share links and the author box.
- Three related stories under a rule label.
Its options.
Set any of these under [template.options]. An option you leave out takes the default shown.
| Option | Default | What it changes |
|---|---|---|
front |
"grid" |
The shape of every list of posts after the lead story: grid or list. |
tagline |
none | One line under the site's name on the front page. |
latest_count |
6 |
How many posts show under Latest on the front page, from 3 to 12. The rest show as headlines by section. |
featured |
true |
The newest post marked featured is the lead story. With false, the newest post is. |
logo |
false |
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 |
"inline-folded" |
Where a long post's contents go: inline, inline-folded, side-end, side-start 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 |
["email", "facebook", "whatsapp"] |
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 Masthead 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.