govuk_tech_docs 4.3.1 → 4.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41679b50cd70bbb1381ec931e5b0beab038f6c5d31e6013a74e587ae0892e8b2
4
- data.tar.gz: f7c9f4e9d1c0642be081c5a7dd58db1516e522808d33120f9694e502cb078884
3
+ metadata.gz: fa9aa9b04c96475883c6eefccd842c4514442cd2e86211eaf11d702174fe00bc
4
+ data.tar.gz: 310b586532f7f0be04d6f80565f83da9160004ccda9dd5091f28fde7cf756d8a
5
5
  SHA512:
6
- metadata.gz: d2e8853fa947b54d2c098d068909e0bda19b57b2c8751b46fe4804a30de4de75a96485cef0d65096f581ba841ad90ede46fed33c1f8c0095753c188bde910ad2
7
- data.tar.gz: 3f8e081713276dcd3ed59178bedd330cc7db344c6ca7d8d8caa48ca2205a1c59224557b8a2999e37c4260da948c81534ab2677c6eafdacb996d43e1ef69c69e8
6
+ metadata.gz: 4a5a5bc7b42ed7535e942797d3fe30d79bd292fe77639828f395d71e41bf0c39362de6ba3d5fabdf2f8e67a2784b31282267718060a733a397ee987453690f8e
7
+ data.tar.gz: fd60adb788a6cec93b734c664a61b5e9e69234559823b509936390453135d9e10a08107eec645f7b6dd93d14bf06e26bc8892b00d26560b182a4b0840bbbf807
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 4.4.0
2
+
3
+ ### New features
4
+
5
+ - [Use the service link as the start of the path to the favicon images if required](https://github.com/alphagov/tech-docs-gem/pull/399)
6
+
7
+ To use the service_link at the start of the path to the favicon images, you need to
8
+ - set `use_service_link_for_favicon: true`
9
+
1
10
  ## 4.3.1
2
11
 
3
12
  - Revert [Fix: Use the service link as the start of the path to the favicon images](https://github.com/alphagov/tech-docs-gem/pull/391)
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "4.3.1".freeze
2
+ VERSION = "4.4.0".freeze
3
3
  end
@@ -11,11 +11,24 @@
11
11
 
12
12
  <link rel="canonical" href="<%= meta_tags.canonical_url %>">
13
13
  <% if config[:tech_docs][:show_govuk_logo] %>
14
- <link rel="icon" sizes="48x48" href="/assets/govuk/assets/images/favicon.ico">
15
- <link rel="icon" sizes="any" href="/assets/govuk/assets/images/favicon.svg" type="image/svg+xml">
16
- <link rel="mask-icon" href="/assets/govuk/assets/images/govuk-icon-mask.svg" color="#0b0c0c">
17
- <link rel="apple-touch-icon" href="/assets/govuk/assets/images/govuk-icon-180.png">
18
- <link rel="manifest" href="/assets/govuk/assets/manifest.json">
14
+ <%
15
+ path_prefix =
16
+ if !development? && config[:tech_docs][:use_service_link_for_favicon]
17
+ service_link = config[:tech_docs][:service_link] || '/'
18
+ # ensure service_link ends with a trailing '/'
19
+ if service_link[-1, 1] != '/'
20
+ service_link += '/'
21
+ end
22
+ service_link
23
+ else
24
+ '/'
25
+ end
26
+ %>
27
+ <link rel="icon" sizes="48x48" href="<%= path_prefix %>assets/govuk/assets/images/favicon.ico">
28
+ <link rel="icon" sizes="any" href="<%= path_prefix %>assets/govuk/assets/images/favicon.svg" type="image/svg+xml">
29
+ <link rel="mask-icon" href="<%= path_prefix %>assets/govuk/assets/images/govuk-icon-mask.svg" color="#0b0c0c">
30
+ <link rel="apple-touch-icon" href="<%= path_prefix %>assets/govuk/assets/images/govuk-icon-180.png">
31
+ <link rel="manifest" href="<%= path_prefix %>assets/govuk/assets/manifest.json">
19
32
  <% else %>
20
33
  <link rel="icon" sizes="48x48" href="/images/favicon.ico">
21
34
  <link rel="icon" sizes="any" href="/images/favicon.svg" type="image/svg+xml">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_tech_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.1
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service