Style guide
For consistency, here are the conventions I’m using in blog posts.
The basic structure of one of my blog posts is:
- YAML prelude, including title, date[1], slug[2], and tags.
- Body, optionally including subheadings, each with initial capital letter
- Optional postscript
Here’s the corresponding markdown:[3]
---
title: "Title with initial capital letter"
draft: true
slug: "some-slug"
authors: "glyn"
tags: ["hashtag1"]
language: "en"
---
Body with optional subheadings (## and deeper).
---
## Postscript
Postscript text.
Images
I centre and scale an image using the markdown below:
<div style="text-align: center;">
<img src="https://underlap.org/data/..." style="width: 35vw;">
</div>
I’ve started building the date into the filename of the markdown file. Eleventy infers the date and this makes it easier to see posts in a particular time period. ↩︎
A slug is the post-specific portion of the post’s URL. ↩︎
This is marked as a draft in case it gets copied to a draft. I don’t want to publish a draft accidentally. ↩︎