govuk_tech_docs 2.0.8 → 2.0.13
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of govuk_tech_docs might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +30 -0
- data/CONTRIBUTING.md +5 -2
- data/Rakefile +1 -0
- data/docs/configuration.md +1 -226
- data/docs/frontmatter.md +1 -154
- data/docs/page-expiry.md +1 -82
- data/example/source/code.html.md +30 -1
- data/example/source/nested-page/another-nested-nested-page/index.html.md +5 -0
- data/govuk_tech_docs.gemspec +12 -12
- data/lib/assets/javascripts/_modules/collapsible-navigation.js +9 -4
- data/lib/assets/stylesheets/_core.scss +1 -0
- data/lib/assets/stylesheets/modules/_header.scss +16 -0
- data/lib/assets/stylesheets/modules/_search.scss +1 -1
- data/lib/assets/stylesheets/modules/_technical-documentation.scss +3 -4
- data/lib/assets/stylesheets/modules/_toc.scss +2 -2
- data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +1 -1
- data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +1 -1
- data/lib/govuk_tech_docs/meta_tags.rb +1 -1
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/layouts/_footer.erb +1 -1
- data/lib/source/layouts/_header.erb +3 -3
- data/lib/source/layouts/core.erb +1 -1
- data/package-lock.json +526 -358
- data/package.json +2 -2
- metadata +65 -71
- data/docs/core-layout-without-sidebar.png +0 -0
- data/docs/core-layout.png +0 -0
- data/docs/expired-page.png +0 -0
- data/docs/last-reviewed-only.png +0 -0
- data/docs/last-reviewed-only.svg +0 -1
- data/docs/layout-layout.png +0 -0
- data/docs/not-expired-page.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35c96cfb5a9198c31ad6a4e4d4a3676299c938089127b1c2a564d2401c50ac10
|
4
|
+
data.tar.gz: 7ea84b4a4c0601a8c291020f538817b4d7dd7503aa57c22124e2dedf8deb3f34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b906c3c277e8f1a5a923c7e05a57491b801109d61d8bda3f3ab393905eff5b39297663ce856ec06735703df5bc1a2389be39948e6b23f633657cc6744226233
|
7
|
+
data.tar.gz: 0ffe6a62bed3f6f8e32c4a087fb3d1a7fb617ff1867e27d3d99f20c08e098de53230885e4dcd438348347596368366212bf17a81042528e5767abe5baa6300d0
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.0.13
|
4
|
+
|
5
|
+
- [Pull request #189: Update orange code highlight colour to meet minimum AA colour contrast ratio criterion](https://github.com/alphagov/tech-docs-gem/pull/189)
|
6
|
+
|
7
|
+
## 2.0.12
|
8
|
+
|
9
|
+
- [Pull request #179: Use current markup for header and footer](https://github.com/alphagov/tech-docs-gem/pull/179)
|
10
|
+
- [Pull request #178: Update dependencies and fix tests](https://github.com/alphagov/tech-docs-gem/pull/178) – includes updating GOV.UK Frontend to v3.6.0.
|
11
|
+
- [Pull request #176: Use correct separator for page titles](https://github.com/alphagov/tech-docs-gem/pull/176)
|
12
|
+
|
13
|
+
## 2.0.11
|
14
|
+
|
15
|
+
### Fixes
|
16
|
+
|
17
|
+
- [Pull request #162: Fix line height spacing for multiline code elements](https://github.com/alphagov/tech-docs-gem/pull/162)
|
18
|
+
- [Pull request #165: Update header alignment to match layout](https://github.com/alphagov/tech-docs-gem/pull/165)
|
19
|
+
|
20
|
+
## 2.0.10
|
21
|
+
|
22
|
+
### Fixes
|
23
|
+
|
24
|
+
- [Pull request #160: Make sure IDs on collapsible navigation are unique](https://github.com/alphagov/tech-docs-gem/pull/160)
|
25
|
+
|
26
|
+
## 2.0.9
|
27
|
+
|
28
|
+
### Fixes
|
29
|
+
|
30
|
+
- [Pull request #154: Fix table columns breaking content](https://github.com/alphagov/tech-docs-gem/pull/154).
|
31
|
+
- [Pull request #155: Ensure the page can be pinch to zoomed](https://github.com/alphagov/tech-docs-gem/pull/155).
|
32
|
+
|
3
33
|
## 2.0.8
|
4
34
|
|
5
35
|
Use of `govuk-lint` replaced with `rubocop-govuk` due to the former [becoming deprecated](https://github.com/alphagov/govuk-lint/pull/133).
|
data/CONTRIBUTING.md
CHANGED
@@ -3,7 +3,10 @@
|
|
3
3
|
Everybody who uses this project is encouraged to contribute to this project. If you're part of the [alphagov GitHub organisation](https://www.github.com/alphagov) you probably have write access to this repo. If you don't, ask a GitHub admin or #tech-docs-format on Slack.
|
4
4
|
|
5
5
|
- Before adding your feature, [check the backlog to see if someone is already talking about it](https://github.com/alphagov/tech-docs-template/issues)
|
6
|
-
- If you add a new option to `config/tech-docs.yml`, make sure you [document the
|
7
|
-
- If you add a new option to the page frontmatter, make sure you [document the
|
6
|
+
- If you add a new option to `config/tech-docs.yml`, make sure you [document the new configuration option][configuration]
|
7
|
+
- If you add a new option to the page frontmatter, make sure you [document the new frontmatter configuration](docs/frontmatter.md)
|
8
8
|
- You can test your contribution using [unit tests](spec/govuk_tech_docs), [javascript tests](spec/javascripts) or [integration tests](spec/features)
|
9
9
|
- If your change is relevant to the users of the gem, add something to [CHANGELOG](CHANGELOG.md). You don't have to do this if it's just refactoring. Make sure that you include any upgrade instructions.
|
10
|
+
|
11
|
+
[configuration]: https://github.com/alphagov/tdt-documentation/blob/master/source/amend_project/configuration/index.html.md.erb
|
12
|
+
[frontmatter]: https://github.com/alphagov/tdt-documentation/blob/master/source/frontmatter.html.md.erb
|
data/Rakefile
CHANGED
data/docs/configuration.md
CHANGED
@@ -1,228 +1,3 @@
|
|
1
1
|
# Configuration
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
These are all the available options:
|
6
|
-
|
7
|
-
## `ga_tracking_id`
|
8
|
-
|
9
|
-
Tracking ID from Google Analytics
|
10
|
-
|
11
|
-
```yaml
|
12
|
-
ga_tracking_id: UA-XXXX-Y
|
13
|
-
```
|
14
|
-
|
15
|
-
## `github_repo`
|
16
|
-
|
17
|
-
Your repository. Required if [show_contribution_banner](#show-contribution-banner) is true.
|
18
|
-
|
19
|
-
```yaml
|
20
|
-
github_repo: alphagov/example-repo
|
21
|
-
```
|
22
|
-
|
23
|
-
## `github_branch`
|
24
|
-
|
25
|
-
Your github branch name. Useful if your default branch is not named master.
|
26
|
-
|
27
|
-
```yaml
|
28
|
-
github_branch: source
|
29
|
-
```
|
30
|
-
|
31
|
-
## `google_site_verification`
|
32
|
-
|
33
|
-
Adds a [Google Site Verification code](https://support.google.com/webmasters/answer/35179?hl=en) to the meta tags.
|
34
|
-
|
35
|
-
```yaml
|
36
|
-
google_site_verification: TvDTuyvdstyusadrCSDrctyd
|
37
|
-
```
|
38
|
-
|
39
|
-
## `enable_search`
|
40
|
-
|
41
|
-
Enables search functionality. This indexes pages only and is not recommended for single-page sites.
|
42
|
-
|
43
|
-
```yaml
|
44
|
-
enable_search: true
|
45
|
-
```
|
46
|
-
|
47
|
-
## `header_links`
|
48
|
-
|
49
|
-
Right hand side navigation.
|
50
|
-
|
51
|
-
Example:
|
52
|
-
|
53
|
-
```yaml
|
54
|
-
header_links:
|
55
|
-
Documentation: /
|
56
|
-
```
|
57
|
-
|
58
|
-
## `footer_links`
|
59
|
-
|
60
|
-
Links to show in footer.
|
61
|
-
|
62
|
-
Example:
|
63
|
-
|
64
|
-
```yaml
|
65
|
-
footer_links:
|
66
|
-
Accessibility: /accessibility
|
67
|
-
```
|
68
|
-
|
69
|
-
## `host`
|
70
|
-
|
71
|
-
Host to use for canonical URL generation (without trailing slash).
|
72
|
-
|
73
|
-
Example:
|
74
|
-
|
75
|
-
```yaml
|
76
|
-
host: https://docs.cloud.service.gov.uk
|
77
|
-
```
|
78
|
-
|
79
|
-
## `collapsible_nav`
|
80
|
-
|
81
|
-
Enable collapsible navigation in the sidebar. Defaults to false;
|
82
|
-
|
83
|
-
```yaml
|
84
|
-
collapsible_nav: true
|
85
|
-
```
|
86
|
-
|
87
|
-
## `multipage_nav`
|
88
|
-
|
89
|
-
Enable multipage navigation in the sidebar. Defaults to false;
|
90
|
-
|
91
|
-
```yaml
|
92
|
-
multipage_nav: true
|
93
|
-
```
|
94
|
-
|
95
|
-
## `max_toc_heading_level`
|
96
|
-
|
97
|
-
Table of contents depth – how many levels to include in the table of contents. If your ToC is too long, reduce this number and we'll only show higher-level headings.
|
98
|
-
|
99
|
-
```yaml
|
100
|
-
max_toc_heading_level: 6
|
101
|
-
```
|
102
|
-
|
103
|
-
## `phase`
|
104
|
-
|
105
|
-
```yaml
|
106
|
-
phase: "Beta"
|
107
|
-
```
|
108
|
-
|
109
|
-
## `prevent_indexing`
|
110
|
-
|
111
|
-
Prevent robots from indexing (e.g. whilst in development)
|
112
|
-
|
113
|
-
```yaml
|
114
|
-
prevent_indexing: false
|
115
|
-
```
|
116
|
-
|
117
|
-
## `redirects`
|
118
|
-
|
119
|
-
A list of redirects, from old to new location. Use this to set up external
|
120
|
-
redirects or if [setting `old_paths` in the frontmatter](docs/frontmatter.md#old_paths) doesn't work.
|
121
|
-
|
122
|
-
```yaml
|
123
|
-
redirects:
|
124
|
-
/old-page.html: https://example.org/something-else.html
|
125
|
-
/another/old-page.html: /another/new-page.html
|
126
|
-
```
|
127
|
-
|
128
|
-
## `service_name`
|
129
|
-
|
130
|
-
The service name in the header.
|
131
|
-
|
132
|
-
Example:
|
133
|
-
|
134
|
-
```yaml
|
135
|
-
service_name: "Platform as a Service"
|
136
|
-
```
|
137
|
-
|
138
|
-
## `full_service_name`
|
139
|
-
|
140
|
-
The full service name (maybe with GOV.UK)
|
141
|
-
|
142
|
-
Example:
|
143
|
-
|
144
|
-
```yaml
|
145
|
-
full_service_name: "GOV.UK Pay"
|
146
|
-
```
|
147
|
-
|
148
|
-
## `service_link`
|
149
|
-
|
150
|
-
What the service name in the header links to.
|
151
|
-
|
152
|
-
default: '/'
|
153
|
-
|
154
|
-
```yaml
|
155
|
-
service_link: "/"
|
156
|
-
```
|
157
|
-
|
158
|
-
## `show_contribution_banner`
|
159
|
-
|
160
|
-
Show a block at the bottom of the page that links to the page source, so readers
|
161
|
-
can easily contribute back to the documentation. If turned on [github_repo](#github-repo) is
|
162
|
-
required.
|
163
|
-
|
164
|
-
Off by default.
|
165
|
-
|
166
|
-
```yaml
|
167
|
-
show_contribution_banner: true
|
168
|
-
github_repo: alphagov/example-repo
|
169
|
-
```
|
170
|
-
|
171
|
-
## `source_urls`
|
172
|
-
|
173
|
-
Customise the URLs that the contribution banner links to. Only useful if
|
174
|
-
[show_contribution_banner](#show_contribution_banner) is turned on. By default, "Report issue" links
|
175
|
-
to raising a GitHub issue but by modifying the `report_issue_url` it can link to an email address
|
176
|
-
or another page.
|
177
|
-
|
178
|
-
```yaml
|
179
|
-
source_urls:
|
180
|
-
report_issue_url: mailto:support@example.com
|
181
|
-
```
|
182
|
-
|
183
|
-
## `show_govuk_logo`
|
184
|
-
|
185
|
-
Whether to show the GOV.UK crown logo.
|
186
|
-
|
187
|
-
default: `true`
|
188
|
-
|
189
|
-
```yaml
|
190
|
-
show_govuk_logo: true
|
191
|
-
```
|
192
|
-
|
193
|
-
## `api_path`
|
194
|
-
|
195
|
-
Define a path to an Open API V3 spec file. This can be a relative file path or a URI to a raw file.
|
196
|
-
|
197
|
-
```yaml
|
198
|
-
api_path: ./source/pets.yml
|
199
|
-
```
|
200
|
-
|
201
|
-
## `owner_slack_workspace` and `default_owner_slack`
|
202
|
-
|
203
|
-
These attributes are used to specify the owner of a page. See the separate
|
204
|
-
[documentation for page expiry][expiry] for more details.
|
205
|
-
|
206
|
-
## `show_expiry`
|
207
|
-
|
208
|
-
Decides whether or not to show a red banner when the page needs to be reviewed.
|
209
|
-
|
210
|
-
If not present or set to `true`, the red banner will appear when the page needs to be reviewed. This is the default behaviour.
|
211
|
-
|
212
|
-
If set to `false`, the red banner will not appear when the page needs to be reviewed.
|
213
|
-
|
214
|
-
See the separate [documentation for page expiry][expiry] for more details.
|
215
|
-
|
216
|
-
[expiry]: https://tdt-documentation.london.cloudapps.digital/page-expiry.html#page-expiry-and-review
|
217
|
-
|
218
|
-
## `show_review_banner`
|
219
|
-
|
220
|
-
Decides whether or not to display the page review banner, regardless of whether the page needs to be reviewed or not.
|
221
|
-
|
222
|
-
If not present or set to `true`, the banner will be displayed on the page. This is the default behaviour.
|
223
|
-
|
224
|
-
If set to `false`, the banner will not be displayed.
|
225
|
-
|
226
|
-
See the separate [documentation for page expiry][expiry] for more details.
|
227
|
-
|
228
|
-
[expiry]: https://tdt-documentation.london.cloudapps.digital/page-expiry.html#page-expiry-and-review
|
3
|
+
This content has been moved to <https://tdt-documentation.london.cloudapps.digital/amend_project/configuration/#configuration-options>.
|
data/docs/frontmatter.md
CHANGED
@@ -1,156 +1,3 @@
|
|
1
1
|
# Available frontmatter
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
## `last_reviewed_on` and `review_in`
|
6
|
-
|
7
|
-
These attributes determine the date when the page needs to be reviewed next.
|
8
|
-
See the separate [documentation for page expiry][expiry] for more details.
|
9
|
-
|
10
|
-
[expiry]: https://tdt-documentation.london.cloudapps.digital/page-expiry.html#page-expiry-and-review
|
11
|
-
|
12
|
-
Example:
|
13
|
-
|
14
|
-
You can use this in combination with [owner_slack](#owner-slack) to set an owner for the page.
|
15
|
-
|
16
|
-
## `layout`
|
17
|
-
|
18
|
-
The layout of the page.
|
19
|
-
|
20
|
-
```yaml
|
21
|
-
---
|
22
|
-
layout: core
|
23
|
-
---
|
24
|
-
```
|
25
|
-
|
26
|
-
There are 2 available page layouts.
|
27
|
-
|
28
|
-
### The `layout` layout (default)
|
29
|
-
|
30
|
-
By default, pages will use the `layout` layout. This layout will parse the page and generate a sidebar with a table of contents consisting of each `h2`, `h3`, `h4` heading.
|
31
|
-
|
32
|
-
```md
|
33
|
-
---
|
34
|
-
layout: layout
|
35
|
-
---
|
36
|
-
|
37
|
-
# The title
|
38
|
-
|
39
|
-
## A subheader
|
40
|
-
|
41
|
-
### A h3 subheader
|
42
|
-
|
43
|
-
## Another subheader
|
44
|
-
```
|
45
|
-
|
46
|
-
Will generate a page with the headings from the content in the sidebar.
|
47
|
-
|
48
|
-
![](layout-layout.png)
|
49
|
-
|
50
|
-
### `core` layout
|
51
|
-
|
52
|
-
If you want more control about the layout, use `core` layout. This allows you to specify the sidebar manually with a `content_for` block.
|
53
|
-
|
54
|
-
```rb
|
55
|
-
---
|
56
|
-
layout: core
|
57
|
-
---
|
58
|
-
|
59
|
-
<% content_for :sidebar do %>
|
60
|
-
You can put anything in the sidebar.
|
61
|
-
<% end %>
|
62
|
-
|
63
|
-
This page has a configurable sidebar that is independent of the content.
|
64
|
-
```
|
65
|
-
|
66
|
-
![](core-layout.png)
|
67
|
-
|
68
|
-
If you do not specify a sidebar, you will get a simple one-column layout without one.
|
69
|
-
|
70
|
-
```rb
|
71
|
-
---
|
72
|
-
layout: core
|
73
|
-
---
|
74
|
-
|
75
|
-
This page does not have a sidebar.
|
76
|
-
```
|
77
|
-
|
78
|
-
![](core-layout-without-sidebar.png)
|
79
|
-
|
80
|
-
## `old_paths`
|
81
|
-
|
82
|
-
Any paths of pages that should redirect to this page.
|
83
|
-
|
84
|
-
Example:
|
85
|
-
|
86
|
-
```yaml
|
87
|
-
---
|
88
|
-
old_paths:
|
89
|
-
- /some-old-page.html
|
90
|
-
---
|
91
|
-
```
|
92
|
-
|
93
|
-
## `owner_slack`
|
94
|
-
|
95
|
-
The Slack username or channel of the page owner. This can be used to appoint an individual or team as responsible for keeping the page up to date.
|
96
|
-
|
97
|
-
```yaml
|
98
|
-
---
|
99
|
-
owner_slack: "#operations-teams"
|
100
|
-
---
|
101
|
-
```
|
102
|
-
|
103
|
-
## `source_url`
|
104
|
-
|
105
|
-
If the contribution banner is turned on, you can override the "View source" link
|
106
|
-
using `source_url`.
|
107
|
-
|
108
|
-
Example:
|
109
|
-
|
110
|
-
```yaml
|
111
|
-
source_url: http://example.org/source.md
|
112
|
-
```
|
113
|
-
|
114
|
-
## `title`
|
115
|
-
|
116
|
-
The browser title of the page.
|
117
|
-
|
118
|
-
```yaml
|
119
|
-
---
|
120
|
-
title: My beautiful page
|
121
|
-
---
|
122
|
-
```
|
123
|
-
|
124
|
-
## `weight`
|
125
|
-
|
126
|
-
Affects the order a page is displayed in the sidebar navigation tree. Lower
|
127
|
-
weights float to the top. Higher weights sink to the bottom.
|
128
|
-
|
129
|
-
```yaml
|
130
|
-
---
|
131
|
-
weight: 20
|
132
|
-
---
|
133
|
-
```
|
134
|
-
|
135
|
-
## `hide_in_navigation`
|
136
|
-
|
137
|
-
Set `hide_in_navigation: true` to prevent the page from being rendered in the
|
138
|
-
main page tree navigation.
|
139
|
-
|
140
|
-
```yaml
|
141
|
-
---
|
142
|
-
hide_in_navigation: true
|
143
|
-
---
|
144
|
-
```
|
145
|
-
|
146
|
-
## `parent`
|
147
|
-
|
148
|
-
The page that should be highlighted as ‘active’ in the navigation.
|
149
|
-
|
150
|
-
```yaml
|
151
|
-
---
|
152
|
-
parent: shaving-yaks.html
|
153
|
-
---
|
154
|
-
```
|
155
|
-
|
156
|
-
[mm]: https://middlemanapp.com/basics/frontmatter
|
3
|
+
This content has been moved to <https://tdt-documentation.london.cloudapps.digital/frontmatter.html#frontmatter>.
|