Skip to content

Commit 1519528

Browse files
Merge pull request #62 from Kuadrant/blog-guide
Add info to readme for writing blog posts
2 parents 4797c13 + 463d68b commit 1519528

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,30 @@ You will need:
1717

1818
# Publishing
1919
Published via GH action, see `.github/workflows/eleventy_build.yml`
20+
21+
# Blog
22+
23+
Blog posts are stored as markdown files in `src/blog/`.
24+
The name of the file doesn't matter.
25+
Metadata is included at the top of the file like this:
26+
27+
```markdown
28+
---
29+
title: My blog post
30+
date: 2024-08-02
31+
author: Me
32+
---
33+
```
34+
35+
This will ensure the blog post title shows up in the post list, grouped by year and sorted by date.
36+
The title, author and date will also render in a styled manner at the top of the post page.
37+
38+
If you want to include images, you can create a folder in the `src/blog/` folder, and put the markdown file there, along with any images.
39+
Then you can insert an image like this:
40+
41+
```njk
42+
{% image "./myimage.png", "My image" %}
43+
```
44+
45+
The post list template is at `src/_includes/postslist.njk`.
46+
The post page template is at `src/_includes/layouts/post.njk`.

0 commit comments

Comments
 (0)