govuk_tech_docs 5.0.2 → 5.1.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 +4 -4
- data/CHANGELOG.md +22 -5
- data/example/config/tech-docs.yml +4 -1
- data/govuk_tech_docs.gemspec +1 -1
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/layouts/_analytics_head.erb +10 -0
- data/lib/source/layouts/core.erb +2 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dc363343ebff60652f16de327d4bc64c8c7d043ca22de573699c62fd177e354
|
4
|
+
data.tar.gz: ff3c5f3505a3592592c088d0e652279eaba401a886fb76bf100e29e266b19d64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68280ebd9b54a3b89962caa936fdda0754459284ac714e5399af7d785f997a52cf4c65c71f0f8fc3dd402a03c38705a8d3b4f0a859ce5590492be3be8c37265b
|
7
|
+
data.tar.gz: bb17570b442df5edffacbb28f4fa5837b8066b63a30cec06ba6952f0bf2f50ea6bb0be536828c08bce108275d4ecd964e0ab768ba1a420d456bd0d68bc83dd78
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
### New Features
|
4
|
+
|
5
|
+
- [Adds support for GA4 as a separate tracking parameter from Universal Analytics](https://github.com/alphagov/tech-docs-gem/pull/350)
|
6
|
+
|
7
|
+
NB: [Universal Analytics is now gone](https://support.google.com/analytics/answer/11583528?hl=en) so anyone still using the older approach is likely facing broken analytics, or has developed a workaround.
|
8
|
+
We'll return at a later date with a major breaking change that deprecates UA code.
|
9
|
+
|
10
|
+
## 5.1.0
|
11
|
+
|
12
|
+
### New features
|
13
|
+
|
14
|
+
- [Add GA4 support](https://github.com/alphagov/tech-docs-gem/pull/350)
|
15
|
+
|
16
|
+
### Fixes
|
17
|
+
|
18
|
+
- [Fix syntax highlighting by pinning middleman-syntax to v3.6+](https://github.com/alphagov/tech-docs-gem/pull/427)
|
19
|
+
|
3
20
|
## 5.0.2
|
4
21
|
|
5
22
|
### Fixes
|
@@ -60,7 +77,7 @@ To use the service_link at the start of the path to the favicon images, you need
|
|
60
77
|
|
61
78
|
- [Allow non-GOV.UK favicon and opengraph assets](https://github.com/alphagov/tech-docs-gem/pull/387)
|
62
79
|
|
63
|
-
To use a non-crown assets, you need to
|
80
|
+
To use a non-crown assets, you need to
|
64
81
|
- add `favicon.ico`, `favicon.svg` and `opengraph-image.png` to your `source/images` folder.
|
65
82
|
- set `show_govuk_logo: false`
|
66
83
|
|
@@ -158,22 +175,22 @@ You can now [configure your Tech Docs Template (TDT) to build your documentation
|
|
158
175
|
|
159
176
|
Thanks [@eddgrant](https://github.com/eddgrant) for contributing this feature and the associated fixes.
|
160
177
|
|
161
|
-
This change was introduced in [pull request #291: Support sites deployed on paths other than "/" (by generating relative links)](https://github.com/alphagov/tech-docs-gem/pull/291).
|
178
|
+
This change was introduced in [pull request #291: Support sites deployed on paths other than "/" (by generating relative links)](https://github.com/alphagov/tech-docs-gem/pull/291).
|
162
179
|
|
163
180
|
## 3.1.0
|
164
181
|
|
165
182
|
### New features
|
166
183
|
|
167
|
-
There are some steps you should follow as the Technical Documentation Template (TDT) now uses GOV.UK Frontend 4.0.0.
|
184
|
+
There are some steps you should follow as the Technical Documentation Template (TDT) now uses GOV.UK Frontend 4.0.0.
|
168
185
|
|
169
186
|
1. Update your documentation site to use the latest template version. You can [follow the TDT guidance on using the latest template version](https://tdt-documentation.london.cloudapps.digital/maintain_project/use_latest_template/).
|
170
|
-
2. Check your documentation site displays correctly. If your site does not display correctly, you can refer to the [GOV.UK Frontend 4.0.0 release note](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0) for more information.
|
187
|
+
2. Check your documentation site displays correctly. If your site does not display correctly, you can refer to the [GOV.UK Frontend 4.0.0 release note](https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0) for more information.
|
171
188
|
|
172
189
|
## 3.0.1
|
173
190
|
|
174
191
|
### Fixes
|
175
192
|
|
176
|
-
We’ve made the following fixes to the tech docs gem in [pull request #281: Don't break TOC when OpenAPI description includes headers](https://github.com/alphagov/tech-docs-gem/pull/281):
|
193
|
+
We’ve made the following fixes to the tech docs gem in [pull request #281: Don't break TOC when OpenAPI description includes headers](https://github.com/alphagov/tech-docs-gem/pull/281):
|
177
194
|
|
178
195
|
* we now render OpenAPI Markdown with the same Markdown renderer as other documents
|
179
196
|
* table of contents (TOC) uses `TechDocsHTMLRenderer` to render the headings with IDs
|
@@ -19,7 +19,10 @@ footer_links:
|
|
19
19
|
Accessibility: /hidden-page.html
|
20
20
|
Hidden Page: /hidden-page.html
|
21
21
|
|
22
|
-
# Tracking ID
|
22
|
+
# Tracking ID (if using GA4 e.g G-XXXXXX)
|
23
|
+
ga4_tracking_id:
|
24
|
+
|
25
|
+
# Tracking ID from Google Universal Analytics (e.g. UA-XXXX-Y)
|
23
26
|
ga_tracking_id:
|
24
27
|
|
25
28
|
# Enable multipage navigation in the sidebar
|
data/govuk_tech_docs.gemspec
CHANGED
@@ -48,7 +48,7 @@ Gem::Specification.new do |spec|
|
|
48
48
|
spec.add_dependency "middleman-livereload"
|
49
49
|
spec.add_dependency "middleman-search-gds"
|
50
50
|
spec.add_dependency "middleman-sprockets", "~> 4.0.0"
|
51
|
-
spec.add_dependency "middleman-syntax", "~> 3.
|
51
|
+
spec.add_dependency "middleman-syntax", "~> 3.6"
|
52
52
|
spec.add_dependency "mutex_m" # TODO: remove once activesupport declares this itself.
|
53
53
|
spec.add_dependency "nokogiri"
|
54
54
|
spec.add_dependency "openapi3_parser", "~> 0.9.0"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if config[:tech_docs][:ga4_tracking_id].is_a?(String) && !config[:tech_docs][:ga4_tracking_id].empty? %>
|
2
|
+
<!-- Google tag (gtag.js) -->
|
3
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= config[:tech_docs][:ga4_tracking_id]%>"></script>
|
4
|
+
<script>
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
6
|
+
function gtag(){dataLayer.push(arguments);}
|
7
|
+
gtag('js', new Date());
|
8
|
+
gtag('config', '<%= config[:tech_docs][:ga4_tracking_id] %>');
|
9
|
+
</script>
|
10
|
+
<% end %>
|
data/lib/source/layouts/core.erb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
<!doctype html>
|
2
2
|
<html lang="en" class="govuk-template <%= config[:tech_docs][:show_govuk_logo] ? 'govuk-template--rebranded ' : '' %>no-js">
|
3
3
|
<head>
|
4
|
+
<%= partial 'layouts/analytics_head' %>
|
5
|
+
|
4
6
|
<meta content="IE=edge" http-equiv="X-UA-Compatible">
|
5
7
|
<meta charset="utf-8">
|
6
8
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
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: 5.0
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Government Digital Service
|
@@ -197,14 +197,14 @@ dependencies:
|
|
197
197
|
requirements:
|
198
198
|
- - "~>"
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
version: '3.
|
200
|
+
version: '3.6'
|
201
201
|
type: :runtime
|
202
202
|
prerelease: false
|
203
203
|
version_requirements: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
205
|
- - "~>"
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: '3.
|
207
|
+
version: '3.6'
|
208
208
|
- !ruby/object:Gem::Dependency
|
209
209
|
name: mutex_m
|
210
210
|
requirement: !ruby/object:Gem::Requirement
|
@@ -481,6 +481,7 @@ files:
|
|
481
481
|
- lib/source/images/search-button.png
|
482
482
|
- lib/source/images/search-result-caret.svg
|
483
483
|
- lib/source/layouts/_analytics.erb
|
484
|
+
- lib/source/layouts/_analytics_head.erb
|
484
485
|
- lib/source/layouts/_footer.erb
|
485
486
|
- lib/source/layouts/_header.erb
|
486
487
|
- lib/source/layouts/_page_review.erb
|
@@ -729,7 +730,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
729
730
|
- !ruby/object:Gem::Version
|
730
731
|
version: '0'
|
731
732
|
requirements: []
|
732
|
-
rubygems_version: 3.6.
|
733
|
+
rubygems_version: 3.6.9
|
733
734
|
specification_version: 4
|
734
735
|
summary: Gem to distribute the GOV.UK Tech Docs Template
|
735
736
|
test_files: []
|