From 10e11c59e73669e3c2a15b6451c8d2ec5e985904 Mon Sep 17 00:00:00 2001 From: David Martin Date: Tue, 6 Aug 2024 11:04:12 +0100 Subject: [PATCH] Add info to readme for writing blog posts --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 941ebe2..a69439f 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,23 @@ You will need: # Publishing Published via GH action, see `.github/workflows/eleventy_build.yml` + +# Blog + +Blog posts are stored as markdown files in `src/blog/`. +The name of the file doesn't matter. +Metadata is included at the top of the file like this: + +```markdown +--- +title: My blog post +date: 2024-08-02 +author: Me +--- +``` + +This will ensure the blog post title shows up in the post list, grouped by year and sorted by date. +The title, author and date will also render in a styled manner at the top of the post page. + +The post list template is at `src/_includes/postslist.njk`. +The post page template is at `src/_includes/layouts/post.njk`.