@x-govuk/govuk-eleventy-plugin 6.2.3 → 6.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/layouts/base.njk CHANGED
@@ -3,9 +3,10 @@
3
3
  {% set assetUrl = assetPath | canonicalUrl %}
4
4
  {% set themeColor = options.themeColour %}
5
5
 
6
- {# Only show default Open Graph image if document does not provide its own #}
6
+ {# Set the opengraphImageUrl in parent template to either the one
7
+ from the page metadata or else fallback to the generic one from options. #}
7
8
  {% set opengraphImage = image if image.opengraphImage else opengraphImage %}
8
- {% set opengraphImageUrl = options.opengraphImageUrl if not opengraphImage %}
9
+ {% set opengraphImageUrl = (opengraphImage.src | canonicalUrl) if opengraphImage else options.opengraphImageUrl %}
9
10
 
10
11
  {# Pagination #}
11
12
  {% set pageNumber = pagination.pageNumber + 1 %}
@@ -52,7 +53,7 @@
52
53
  {% if description %}<meta property="og:description" name="description" content="{{ description | markdown("inline") | striptags(true) }}">{% endif %}
53
54
  {% if opengraphImage %}<meta name="twitter:card" content="summary_large_image">{% endif %}
54
55
  {% if opengraphImage.src %}<meta name="twitter:image" content="{{ opengraphImage.src | canonicalUrl }}">
55
- <meta property="og:image" content="{{ opengraphImage.src | canonicalUrl }}">{% endif %}
56
+ {% endif %}
56
57
  {% if opengraphImage.alt %}<meta property="og:image:alt" content="{{ opengraphImage.alt }}">{% endif %}
57
58
  {% endblock %}
58
59
 
@@ -1,2 +1,2 @@
1
1
  module.exports = (collection) =>
2
- collection.getAll().filter((item) => !item.inputPath.includes('.scss'))
2
+ collection.getAllSorted().filter((item) => !item.inputPath.includes('.scss'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-govuk/govuk-eleventy-plugin",
3
- "version": "6.2.3",
3
+ "version": "6.2.5",
4
4
  "description": "Write documentation using Markdown and publish it using GOV.UK styles",
5
5
  "keywords": [
6
6
  "govuk",