Authors and books template. Chapter
An author's site, with the newest book beside its cover, the books as a shelf of covers, excerpts and essays as a book's contents page, events as dated rows and excerpts set as a page of the book.
Free and open source, built into Khalid.
khalid init blog --template chapter
The home page, a post and a phone.
What it shows.
Chapter is a template for an author's own site. It shows your books, pages from them and the events where readers can meet you. It is set like the first pages of a book, not like a blog.
What the front page shows
- Your name, large, and the
taglineunder it in italics. - The new book: your newest book with its description, its first three facts, an "About the book" button and the order link, beside its cover.
- I. Books: every book as a shelf of covers, each with its title and year.
- II. Excerpts and essays: every other post as a book's contents page. Each has a number, its title, a dotted leader running to its date, and its category and description under it.
- III. Events: the newest events,
events_countof them, as dated rows with when, the title, the venue and city, and the tickets link. - Your call to action as a band, and the newsletter form.
Each part opens like a chapter, with a Roman numeral over its name. A part with no posts is left out, and the numerals count only the parts shown.
What a post shows
- A book: its cover beside the title, the description, the author, the facts in a ruled list and the order button. Then the text at a reading width.
- An event: the title, then the facts in a panel and the tickets button, then the lead picture and the text.
- An excerpt: the category, the title, the description in italics and an ornament. The text is set in the heading font and larger, with a drop cap and the first line in small capitals.
- Other writing: the category, the title, the description, the lead picture and the text.
Every post ends with its tags, the share links, the author box and related posts as a short contents page.
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 your name on the front page. |
books_category |
books |
The slug of the category that holds your books. |
events_category |
events |
The slug of the category that holds your events. |
excerpts_category |
excerpts |
The slug of the category whose posts are set as a page of the book. |
events_count |
4 |
How many events show on the front page, from 0 to 10. |
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 |
"text" |
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 |
4 |
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 |
["bluesky", "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 Chapter 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.