Skip to content

Commit 23f9800

Browse files
Add a sample post template (#430)
This is aimed to make it quicker to get started, by giving you a template you can copy with all the relevant fields. There is a 'Copy code' button to help you quickly copy it into a code editor. <img width="2068" height="4024" alt="localhost_8080_guide_a-sample-template_" src="https://github.com/user-attachments/assets/5f878cb7-516b-4721-908a-40da2d480bd2" /> --------- Co-authored-by: Ed Horsford <mail@edwardhorsford.com>
1 parent 9b70171 commit 23f9800

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

app/guide/a-sample-template.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: page
3+
title: A sample post template
4+
description: You can use this template to get you started.
5+
eleventyNavigation:
6+
parent: Guide
7+
---
8+
9+
This template contains all the possible metadata you can add to a post, and some sample markdown for the content (see [full markdown guide](/guide/using-markdown/)).
10+
11+
You don’t have to use this template, but it may be helpful.
12+
13+
To use it, create a new subfolder for your post, add an `index.md` file in the subfolder and copy in template below.
14+
15+
All metadata is optional except for the title and date. Delete any lines you do not need.
16+
17+
```markdown { .nhsuk-code--button }
18+
---
19+
title: This is the title of the post
20+
description: This description will appear on index pages and when sharing on social media.
21+
date: 2025-12-01
22+
tags:
23+
- add
24+
- tags
25+
- to help group
26+
- related posts
27+
author:
28+
- Your Name
29+
- Another Name
30+
opengraphImage:
31+
src: /your-service/2025/12/post-title/image-name.png
32+
alt: Alternative text for the lead image
33+
---
34+
35+
An intro paragraph which summarises the whole thing.
36+
37+
## Heading
38+
39+
Some content.
40+
41+
[A link to another post](/your-service/2025/11/another-post-title/)
42+
43+
### Subheading
44+
45+
More content
46+
47+
![Alt text for an image](/your-service/2025/12/post-title/image.jpg)
48+
49+
This image has a visible caption:
50+
51+
![Alt text for an image](nhs-logo.png "Caption for the image")
52+
53+
```

0 commit comments

Comments
 (0)