govuk_tech_docs 4.3.0 → 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: 4a331ce0ed0284aa211127a3fe376cc99ec4bd5d187719420411326f655914b0
4
- data.tar.gz: e19942e5fbc892aeed1a7afa001704edb59e3ceef06ea249015d5f019b4e06e0
3
+ metadata.gz: fa9aa9b04c96475883c6eefccd842c4514442cd2e86211eaf11d702174fe00bc
4
+ data.tar.gz: 310b586532f7f0be04d6f80565f83da9160004ccda9dd5091f28fde7cf756d8a
5
5
  SHA512:
6
- metadata.gz: d1d5587e90903496036c3c3f12420aaabe505416a47c9be4368d2d21df84db2b6d2e38972697339b0207d83cf1cfe771b3ad35d8d569e51b1d27a99de6f436ca
7
- data.tar.gz: 84bb340e57ac4a98bd74adf68dc904b6d38f57224de3f0c32beb26239cfbdebb1c72ef43ae4192315a70084202d65bb480511c613f3a9bf885f3575b6112ece2
6
+ metadata.gz: 4a5a5bc7b42ed7535e942797d3fe30d79bd292fe77639828f395d71e41bf0c39362de6ba3d5fabdf2f8e67a2784b31282267718060a733a397ee987453690f8e
7
+ data.tar.gz: fd60adb788a6cec93b734c664a61b5e9e69234559823b509936390453135d9e10a08107eec645f7b6dd93d14bf06e26bc8892b00d26560b182a4b0840bbbf807
data/CHANGELOG.md CHANGED
@@ -1,11 +1,22 @@
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
+
10
+ ## 4.3.1
11
+
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)
13
+
1
14
  ## 4.3.0
2
15
 
3
16
  - [Bump govuk-frontend to v5.9.0 and pin middleman to v4.5.1](https://github.com/alphagov/tech-docs-gem/pull/390)
4
17
 
5
18
  - [Fix: Update Rack::File to Rack::Files in test specs](https://github.com/alphagov/tech-docs-gem/pull/394)
6
19
 
7
- - [Fix: Use the service link as the start of the path to the favicon images](https://github.com/alphagov/tech-docs-gem/pull/391)
8
-
9
20
  ## 4.2.0
10
21
 
11
22
  ## New features
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "4.3.0".freeze
2
+ VERSION = "4.4.0".freeze
3
3
  end
@@ -12,15 +12,17 @@
12
12
  <link rel="canonical" href="<%= meta_tags.canonical_url %>">
13
13
  <% if config[:tech_docs][:show_govuk_logo] %>
14
14
  <%
15
- if development?
16
- path_prefix = '/'
17
- else
18
- path_prefix = config[:tech_docs][:service_link] || '/'
19
- # ensure service_link ends with a trailing '/'
20
- if path_prefix[-1, 1] != '/'
21
- path_prefix += '/'
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
+ '/'
22
25
  end
23
- end
24
26
  %>
25
27
  <link rel="icon" sizes="48x48" href="<%= path_prefix %>assets/govuk/assets/images/favicon.ico">
26
28
  <link rel="icon" sizes="any" href="<%= path_prefix %>assets/govuk/assets/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.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service