From bc6c0905b482166db6b05f97b2a959e3d99f7299 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 25 Mar 2026 14:22:41 +0000 Subject: [PATCH 1/8] Add a post template This is aimed to make it quicker to get started, by giving you a template you can copy with all the relevant fields. --- app/guide/a-sample-template.md | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 app/guide/a-sample-template.md diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md new file mode 100644 index 00000000..28db5c5d --- /dev/null +++ b/app/guide/a-sample-template.md @@ -0,0 +1,48 @@ +--- +layout: page +title: A post template +description: Use this template to get you started. +eleventyNavigation: + parent: Guide +--- + +Create a new subfolder for your post. + +Add an `index.md` file in the subfolder and copy in the markdown below. + +Delete the lines for any features you don’t need. + +```markdown +--- +title: "Post title: try to keep it short!" +date: 2025-12-01 +description: This description will appear on index pages. +tags: + - add + - tags + - to help group + - related posts +author: + - Your Name + - Another Name +opengraphImage: + src: /your-service/2025/12/post-title/image-name.png + alt: Alternative text for the lead image (appears when sharing) +--- + +An intro paragraph which summarises the whole thing. + +## Heading + +Some content. + +[A link to another post](/your-service/2025/11/another-post-title/) + +### Subheading + +More content + +![Alt text for an image](/your-service/2025/12/post-title/image.jpg) + + +``` From 9e895571d2e36b9aa8d4d3f8b52ccfdc2774e69a Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Thu, 26 Mar 2026 10:21:16 +0000 Subject: [PATCH 2/8] Update intro --- app/guide/a-sample-template.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index 28db5c5d..e1fbe72a 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -1,20 +1,22 @@ --- layout: page -title: A post template -description: Use this template to get you started. +title: A sample post template +description: You can use this template to get you started. eleventyNavigation: parent: Guide --- -Create a new subfolder for your post. +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/)). -Add an `index.md` file in the subfolder and copy in the markdown below. +You don’t have to use this template, but it may be helpful. -Delete the lines for any features you don’t need. +To use it, create a new subfolder for your post, add an `index.md` file in the subfolder and copy in template below. + +For any metadata not needed, you can delete those lines. ```markdown --- -title: "Post title: try to keep it short!" +title: This is the title of the post date: 2025-12-01 description: This description will appear on index pages. tags: @@ -23,7 +25,7 @@ tags: - to help group - related posts author: - - Your Name + - Your Name (optional) - Another Name opengraphImage: src: /your-service/2025/12/post-title/image-name.png From 855cc2eaca56be59b29b43b13609d785e4f4c3e7 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Thu, 26 Mar 2026 10:46:03 +0000 Subject: [PATCH 3/8] Swap order Co-authored-by: Ed Horsford --- app/guide/a-sample-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index e1fbe72a..24cde6d6 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -17,8 +17,8 @@ For any metadata not needed, you can delete those lines. ```markdown --- title: This is the title of the post -date: 2025-12-01 description: This description will appear on index pages. +date: 2025-12-01 tags: - add - tags From b9a0ffd7b7bea8aa48f72f5715b711937899b6d7 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Thu, 26 Mar 2026 14:01:13 +0000 Subject: [PATCH 4/8] Add a line about metadata being optional --- app/guide/a-sample-template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index 24cde6d6..e7fc8337 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -12,7 +12,7 @@ You don’t have to use this template, but it may be helpful. To use it, create a new subfolder for your post, add an `index.md` file in the subfolder and copy in template below. -For any metadata not needed, you can delete those lines. +All metadata is optional except for the title and date. Delete any lines you do not need. ```markdown --- @@ -25,7 +25,7 @@ tags: - to help group - related posts author: - - Your Name (optional) + - Your Name - Another Name opengraphImage: src: /your-service/2025/12/post-title/image-name.png From a89ff96fb045ed83aa84e01231cf700100f74598 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 8 Apr 2026 16:16:31 +0100 Subject: [PATCH 5/8] Add example of image with caption --- app/guide/a-sample-template.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index e7fc8337..b81a34e1 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -46,5 +46,8 @@ More content ![Alt text for an image](/your-service/2025/12/post-title/image.jpg) +This image has a visible caption: + +![Alt text for an image](nhs-logo.png "Caption for the image") ``` From ca7b183c5fa12891ca7501f716e3a418d4aac365 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 8 Apr 2026 16:42:40 +0100 Subject: [PATCH 6/8] Add copy code button --- app/guide/a-sample-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index b81a34e1..eccc2924 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -14,7 +14,7 @@ To use it, create a new subfolder for your post, add an `index.md` file in the s All metadata is optional except for the title and date. Delete any lines you do not need. -```markdown +```markdown { .nhsuk-code--button } --- title: This is the title of the post description: This description will appear on index pages. From 94872c2d8a46037fb8f5fac758ba99c5a532b838 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 8 Apr 2026 17:05:33 +0100 Subject: [PATCH 7/8] simplify --- app/guide/a-sample-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index eccc2924..99ea5d2f 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -29,7 +29,7 @@ author: - Another Name opengraphImage: src: /your-service/2025/12/post-title/image-name.png - alt: Alternative text for the lead image (appears when sharing) + alt: Alternative text for the lead image --- An intro paragraph which summarises the whole thing. From 3c5eb18ceca6f5e27e1ca630413b538beaa6999e Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 8 Apr 2026 17:07:26 +0100 Subject: [PATCH 8/8] Update description content --- app/guide/a-sample-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/guide/a-sample-template.md b/app/guide/a-sample-template.md index 99ea5d2f..10e6aaf0 100644 --- a/app/guide/a-sample-template.md +++ b/app/guide/a-sample-template.md @@ -17,7 +17,7 @@ All metadata is optional except for the title and date. Delete any lines you do ```markdown { .nhsuk-code--button } --- title: This is the title of the post -description: This description will appear on index pages. +description: This description will appear on index pages and when sharing on social media. date: 2025-12-01 tags: - add