Skip to content

Commit

Permalink
Add info to readme for writing blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
david-martin committed Aug 6, 2024
1 parent 4797c13 commit 10e11c5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit 10e11c5

Please sign in to comment.