Skip to content

Commit

Permalink
Use dot notation for collections
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Oct 18, 2023
1 parent 1c46f4d commit ad138b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ eleventyComputed:
title: "{{ pkg.description }}"
---
<div class="govuk-grid-row">
{% for item in collections["homepage"] %}
{% for item in collections.homepage %}
<section class="govuk-grid-column-one-third-from-desktop govuk-!-margin-bottom-8">
<h2 class="govuk-heading-m govuk-!-font-size-27">{{ item.data.title | smart }}</h2>
<p class="govuk-body">{{ item.data.description | markdown("inline") }}</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down

0 comments on commit ad138b5

Please sign in to comment.