@x-govuk/nhsuk-eleventy-plugin 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-govuk/nhsuk-eleventy-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Write documentation using Markdown and publish it using NHS.UK styles",
5
5
  "keywords": [
6
6
  "nhsuk",
@@ -33,10 +33,13 @@
33
33
  }
34
34
 
35
35
  [class^="nhsuk-heading"][tabindex] .nhsuk-link {
36
- text-decoration: none;
37
-
38
36
  @include nhsuk-link-style-text;
39
37
 
38
+ // stylelint-disable no-duplicate-selectors
39
+ & {
40
+ text-decoration: none;
41
+ }
42
+
40
43
  &:hover::after,
41
44
  :target &::after {
42
45
  color: nhsuk-colour("grey-1");
@@ -1,8 +1,16 @@
1
+ {%- macro _author(author) -%}
2
+ <author>
3
+ <name>{{ author.name or author }}</name>
4
+ {% if author.url %}
5
+ <uri>{{ author.url }}</uri>
6
+ {% endif %}
7
+ </author>
8
+ {% endmacro -%}
9
+
1
10
  <?xml version="1.0" encoding="utf-8"?>
2
11
  <feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ options.url }}">
3
12
  <title>{{ title or options.homeKey }}</title>
4
13
  <link href="{{ page.url | canonicalUrl }}" rel="self"/>
5
- <link href="{{ options.url }}"/>
6
14
  <updated>{{ collections[collection.name] | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
7
15
  <id>{{ options.url }}</id>
8
16
  {% for item in collections[collection.name] | sliceFromCollection(collection.limit) %}
@@ -12,14 +20,13 @@
12
20
  <link href="{{ absolutePostUrl }}"/>
13
21
  <updated>{{ item.date | dateToRfc3339 }}</updated>
14
22
  <id>{{ absolutePostUrl }}</id>
15
- {% for author in item.data.authors or [item.data.author] %}
16
- <author>
17
- <name>{{ author.name }}</name>
18
- {% if author.url %}
19
- <uri>{{ author.url }}</uri>
20
- {% endif %}
21
- </author>
22
- {% endfor %}
23
+ {%- if item.data.author is string or item.data.author is mapping -%}
24
+ {{- _author(item.data.author) -}}
25
+ {%- else -%}
26
+ {%- for author in item.data.author -%}
27
+ {{- _author(author) -}}
28
+ {%- endfor -%}
29
+ {%- endif -%}
23
30
  <content xml:lang="{{ language or "en" }}" type="html">
24
31
  <![CDATA[
25
32
  {% if item.data.image %}<figure><img src="{{ item.data.image.src | canonicalUrl }}" alt="{{ item.data.image.alt }}">{% if item.data.image.caption %}<figcaption>{{ item.data.image.caption | markdown }}</figcaption>