Science explainers template. Lattice
A science explainer site, with every picture a numbered figure, key numbers from each post's facts, footnotes as numbered tabs and marked glossary terms.
Free and open source, built into Khalid.
khalid init blog --template lattice
The home page, a post and a phone.
What it shows.
Lattice is a template for a science explainer site. Each post explains one idea, such as why the sky is blue or how tides work. Every picture is a numbered figure, every source a footnote and every hard word a link to your glossary.
What the front page shows
- Your site's name, large, and the
taglineunder it. Up to four numbers fromhero_statsshow under it when you write them. - The lead explainer: your newest featured post, or else your newest post, as a large figure with its topic, title, summary and key numbers.
- Topics: every category as a numbered tile.
- Latest explainers: the other posts as a grid of numbered figures, each with its topic, title and summary.
- Numbered page links, your call to action as a band, and the sign-up form when you set
newslettertohomeorboth.
What a post shows
- The trail from the home page, then the topic as a small label.
- The title, the description as the answer, the author, the date and the reading time.
- The lead picture as figure 01, on its grid.
- Key numbers: the facts as a row of large numbers.
- The text in one column of about 65 characters a line, with numbered figures, footnote tabs and marked glossary terms. Long posts get a folded contents list.
- The notes, the subjects (tags), the share links and the author box.
- Three related explainers as figures.
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. |
hero_stats |
none | Up to four numbers under the site's name, each written number | what it counts. |
key_numbers |
true |
A post's facts show as key numbers under its lead picture and under the lead explainer. |
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 |
"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 |
"numbered" |
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", "facebook", "email"] |
The networks the share links go to, in order. |
newsletter |
"post" |
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 Lattice 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.