Khalid / Templates / Gazette

News template. Gazette

A local news site with many sections, with a block per section under a bold section flag, a rail of the latest news grouped by day, dense headlines that each carry their place, and a dateline on every story.

Free and open source, built into Khalid.

Start a blog
khalid init blog --template gazette
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 Gazette template
The home page
A post in the Gazette template
A post
The home page of the Gazette template on a phone
On a phone

What it shows.

Gazette is a template for a local news site with many sections, such as council, schools, sport, business and what's on. The front page shows every section at once, each in its own block under a bold section flag, with the newest stories running down a rail beside them. Headlines are packed close, and each one can carry the street or village it happened in.

What the front page shows

  1. The edition bar: the front page's title, then the date of the newest story and your tagline at the end of the same line.
  2. The section index: one link per section, each jumping to its block further down. On a phone the row scrolls sideways.
  3. The top story: its picture beside its place or section, the headline large, the summary, the writer, the date and the reading time.
  4. The section blocks, two across on a wide screen. Each opens with the section flag: the section's name in reverse on a heavy rule, linked to the section, with an "All Sport stories" link at the rule's end. Then the section's newest story with a small picture and summary, and up to three more as headlines with their places. The top story is not repeated in its section.
  5. The latest news rail, beside the top story and the blocks on a wide screen and under the top story on a phone: the newest stories (option rail_count), grouped under the day they came out, each a place and a headline. The newsletter form closes the rail.
  6. The numbered page links and the call to action band.

Later pages of the front page list their stories as headlines grouped by day, each with its place and summary.

When site.toml sets home sections ([[reader.home_sections]]), each one is a block in place of the categories.

List pages

A section, tag or archive page shows its name under a heavy rule with its intro, the newest story as a lead with its picture, then the rest as headlines grouped by day, in two columns on a wide screen. A reporter's page shows their photo, role and bio, then their stories grouped by day.

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 in the edition bar on the front page, such as the towns you cover.
rail_count 10 How many of the newest stories the latest news rail lists, from 4 to 20.
logo true The header shows your logo from [brand] logo in place of the site's name.
breadcrumbs false Each page shows the trail of links from the home page to it.
dek true A story shows its description under its headline.
updated_note false An updated story 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.
featured true The newest featured post is the top story. Off, the newest post is.
pagination "numbered" numbered links to each page near this one; pages shows only newer and older.
related_count 5 How many related stories show under More news, from 3 to 10.
contents "inline-folded" Where a long story'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 story shows its share links: none, top, end or both.
share_networks ["facebook", "bluesky", "email"] The networks the share links go to, in order.
newsletter "home" Where the newsletter form shows: none, post, home or both. On the front page it closes the rail.
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.

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 Gazette 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.