nbs 2 posts#115
Conversation
Just spotted this - @colinrotherham is this what you were referring to when you mentioned changing the date to match the file name?
| <figure> | ||
|
|
||
|  | ||
|
|
||
|
|
||
| <figcaption>From the <a href="https://service-manual.nhs.uk/design-system/components/panel">NHS.UK Design System</a></figcaption> | ||
| </figure> |
There was a problem hiding this comment.
@paulrobertlloyd I've seen screenshot items being looped, but is there a better Nunjucks way to output these figure and figcaptions?
There was a problem hiding this comment.
For individual figures with figcaption, you can use the following Markdown:
The templates also support providing a list of screenshots at the bottom of a post. For that, you can use the screenshots array, i.e.
---
title: My post
screenshots:
items:
- Start page
- Confirmation page
---The above assumes that the two images are named start-page.png and confirmation-page.png. If you want to reference invidual files, you can use the src value, and if you want to add a caption, you cam add the caption value, like so:
---
title: My post
screenshots:
items:
- text: Start page
caption: This is the start page.
- text: Confirmation page
src: confirmation-page-with-photo.jpg
caption: We show a photograph on the confirmation page
---Here’s an example of a page with a list of screenshots: https://design-history.prevention-services.nhs.uk/manage-vaccinations-in-schools/2024/03/pilot-record-a-vaccination/
Might this be worth documenting in the guide area @frankieroberto?
There was a problem hiding this comment.
For the above, you could conceivably use the following Markdown:
 System")But I’d discourage using Markdown inside the caption because a.) it might not work and b.) this is really intended to be used as the title attribute on the image, which of course can not display HTML (this is a commonly used hack around Markdown’s lack of support for figures and figcaptions)
colinrotherham
left a comment
There was a problem hiding this comment.
Looks like everything's working as intended
Maybe the bold text like "The new screen" should all be heading 3s?
-**The new screen**
+###The new screen
New posts for NBS book: