From ad138b59bd28b78435ca9358db73c8ec1f9150be Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Wed, 18 Oct 2023 22:35:12 +0100 Subject: [PATCH] Use dot notation for collections --- docs/get-started.md | 4 ++-- docs/index.md | 2 +- docs/layouts.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/get-started.md b/docs/get-started.md index 00cb87fb..3db8e3bb 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -107,9 +107,9 @@ Open the preview URL in your browser to see this new page appear using GOV.UK st ## Choose a layout -This plugin provides {{ collections["layout"] | length }} different layouts, each with different options you can provide in the front matter: +This plugin provides {{ collections.layout | length }} different layouts, each with different options you can provide in the front matter: -{% for page in collections["layout"] %} +{% for page in collections.layout %} * [{{ page.data.title }}]({{ page.url | url }}) – {{ page.data.description }} diff --git a/docs/index.md b/docs/index.md index 8f864922..da7774ef 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ eleventyComputed: title: "{{ pkg.description }}" ---
-{% for item in collections["homepage"] %} +{% for item in collections.homepage %}

{{ item.data.title | smart }}

{{ item.data.description | markdown("inline") }}

diff --git a/docs/layouts.md b/docs/layouts.md index 5b568767..9fbfb811 100644 --- a/docs/layouts.md +++ b/docs/layouts.md @@ -4,7 +4,7 @@ order: 3 title: Layouts description: The plugin offers a number of layouts to match the type of content you want write. --- -{% for page in collections["layout"] %} +{% for page in collections.layout %} * [{{ page.data.title }}]({{ page.url | url }}) – {{ page.data.description }}