dss_tech_docs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +29 -0
  3. data/.gitignore +37 -0
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +11 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +9 -0
  8. data/CHANGELOG.md +274 -0
  9. data/CONTRIBUTING.md +9 -0
  10. data/Gemfile +4 -0
  11. data/LICENCE +21 -0
  12. data/README.md +89 -0
  13. data/Rakefile +13 -0
  14. data/docs/configuration.md +205 -0
  15. data/docs/core-layout-without-sidebar.png +0 -0
  16. data/docs/core-layout.png +0 -0
  17. data/docs/expired-page.png +0 -0
  18. data/docs/frontmatter.md +145 -0
  19. data/docs/last-reviewed-only.png +0 -0
  20. data/docs/last-reviewed-only.svg +1 -0
  21. data/docs/layout-layout.png +0 -0
  22. data/docs/not-expired-page.png +0 -0
  23. data/docs/page-expiry.md +85 -0
  24. data/dss_tech_docs.gemspec +46 -0
  25. data/example/.ruby-version +1 -0
  26. data/example/Gemfile +3 -0
  27. data/example/config.rb +9 -0
  28. data/example/config/hide-expiry.yml +51 -0
  29. data/example/config/tech-docs.yml +50 -0
  30. data/example/source/api-path.html.md +7 -0
  31. data/example/source/api-reference.html.md +5 -0
  32. data/example/source/child-of-expired-page.html.md +8 -0
  33. data/example/source/core-layout-without-sidebar.html.md.erb +7 -0
  34. data/example/source/core-layout.html.md.erb +12 -0
  35. data/example/source/expired-page-with-owner.html.md +10 -0
  36. data/example/source/expired-page.html.md +9 -0
  37. data/example/source/headings.html.md +11 -0
  38. data/example/source/index.html.md.erb +19 -0
  39. data/example/source/javascripts/application.js +1 -0
  40. data/example/source/not-expired-page.html.md +9 -0
  41. data/example/source/pets.yml +109 -0
  42. data/example/source/stylesheets/print.css.scss +3 -0
  43. data/example/source/stylesheets/screen-old-ie.css.scss +4 -0
  44. data/example/source/stylesheets/screen.css.scss +1 -0
  45. data/example/source/templates/proxy_template.html.md +8 -0
  46. data/lib/assets/javascripts/_analytics.js +58 -0
  47. data/lib/assets/javascripts/_govuk/modules.js +57 -0
  48. data/lib/assets/javascripts/_modules/anchored-headings.js +18 -0
  49. data/lib/assets/javascripts/_modules/collapsible-navigation.js +95 -0
  50. data/lib/assets/javascripts/_modules/in-page-navigation.js +132 -0
  51. data/lib/assets/javascripts/_modules/navigation.js +34 -0
  52. data/lib/assets/javascripts/_modules/page-expiry.js +15 -0
  53. data/lib/assets/javascripts/_modules/search.js +367 -0
  54. data/lib/assets/javascripts/_modules/table-of-contents.js +111 -0
  55. data/lib/assets/javascripts/_start-modules.js +13 -0
  56. data/lib/assets/javascripts/_vendor/fixedsticky.js +194 -0
  57. data/lib/assets/javascripts/_vendor/jquery.js +5 -0
  58. data/lib/assets/javascripts/_vendor/jquery.mark.js +1081 -0
  59. data/lib/assets/javascripts/_vendor/lodash.js +613 -0
  60. data/lib/assets/javascripts/_vendor/modernizr.js +3 -0
  61. data/lib/assets/javascripts/govuk_tech_docs.js +10 -0
  62. data/lib/assets/stylesheets/_accessibility.scss +9 -0
  63. data/lib/assets/stylesheets/_core.scss +71 -0
  64. data/lib/assets/stylesheets/_fonts.scss +29 -0
  65. data/lib/assets/stylesheets/_govuk_tech_docs.scss +2 -0
  66. data/lib/assets/stylesheets/_syntax-highlighting.scss +196 -0
  67. data/lib/assets/stylesheets/_variables.scss +12 -0
  68. data/lib/assets/stylesheets/govuk_frontend_toolkit/_colours.scss +2 -0
  69. data/lib/assets/stylesheets/govuk_frontend_toolkit/_conditionals.scss +81 -0
  70. data/lib/assets/stylesheets/govuk_frontend_toolkit/_css3.scss +90 -0
  71. data/lib/assets/stylesheets/govuk_frontend_toolkit/_device-pixels.scss +10 -0
  72. data/lib/assets/stylesheets/govuk_frontend_toolkit/_font_stack.scss +19 -0
  73. data/lib/assets/stylesheets/govuk_frontend_toolkit/_grid_layout.scss +136 -0
  74. data/lib/assets/stylesheets/govuk_frontend_toolkit/_helpers.scss +16 -0
  75. data/lib/assets/stylesheets/govuk_frontend_toolkit/_measurements.scss +14 -0
  76. data/lib/assets/stylesheets/govuk_frontend_toolkit/_shims.scss +55 -0
  77. data/lib/assets/stylesheets/govuk_frontend_toolkit/_typography.scss +249 -0
  78. data/lib/assets/stylesheets/govuk_frontend_toolkit/_url-helpers.scss +16 -0
  79. data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_organisation.scss +103 -0
  80. data/lib/assets/stylesheets/govuk_frontend_toolkit/colours/_palette.scss +77 -0
  81. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_alpha-beta.scss +66 -0
  82. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_breadcrumbs.scss +53 -0
  83. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_buttons.scss +141 -0
  84. data/lib/assets/stylesheets/govuk_frontend_toolkit/design-patterns/_media-player.scss +242 -0
  85. data/lib/assets/stylesheets/modules/_anchored-heading.scss +54 -0
  86. data/lib/assets/stylesheets/modules/_app-pane.scss +64 -0
  87. data/lib/assets/stylesheets/modules/_collapsible.scss +52 -0
  88. data/lib/assets/stylesheets/modules/_contribution-banner.scss +22 -0
  89. data/lib/assets/stylesheets/modules/_footer.scss +130 -0
  90. data/lib/assets/stylesheets/modules/_govuk-logo.scss +47 -0
  91. data/lib/assets/stylesheets/modules/_header.scss +290 -0
  92. data/lib/assets/stylesheets/modules/_page-review.scss +35 -0
  93. data/lib/assets/stylesheets/modules/_phase-banner.scss +22 -0
  94. data/lib/assets/stylesheets/modules/_search.scss +137 -0
  95. data/lib/assets/stylesheets/modules/_skip-link.scss +31 -0
  96. data/lib/assets/stylesheets/modules/_technical-documentation.scss +241 -0
  97. data/lib/assets/stylesheets/modules/_toc.scss +216 -0
  98. data/lib/assets/stylesheets/modules/_warning-text.scss +73 -0
  99. data/lib/assets/stylesheets/palette/_syntax-highlighting.scss +23 -0
  100. data/lib/assets/stylesheets/utilities/_fonts.scss +29 -0
  101. data/lib/assets/stylesheets/utilities/_printable.scss +13 -0
  102. data/lib/assets/stylesheets/vendor/_fixedsticky.scss +22 -0
  103. data/lib/dss_tech_docs.rb +121 -0
  104. data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +101 -0
  105. data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +279 -0
  106. data/lib/govuk_tech_docs/api_reference/templates/api_reference_full.html.erb +19 -0
  107. data/lib/govuk_tech_docs/api_reference/templates/operation.html.erb +11 -0
  108. data/lib/govuk_tech_docs/api_reference/templates/parameters.html.erb +28 -0
  109. data/lib/govuk_tech_docs/api_reference/templates/path.html.erb +4 -0
  110. data/lib/govuk_tech_docs/api_reference/templates/responses.html.erb +33 -0
  111. data/lib/govuk_tech_docs/api_reference/templates/schema.html.erb +29 -0
  112. data/lib/govuk_tech_docs/contribution_banner.rb +62 -0
  113. data/lib/govuk_tech_docs/meta_tags.rb +67 -0
  114. data/lib/govuk_tech_docs/page_review.rb +52 -0
  115. data/lib/govuk_tech_docs/pages.rb +32 -0
  116. data/lib/govuk_tech_docs/redirects.rb +39 -0
  117. data/lib/govuk_tech_docs/table_of_contents/heading.rb +30 -0
  118. data/lib/govuk_tech_docs/table_of_contents/heading_tree.rb +27 -0
  119. data/lib/govuk_tech_docs/table_of_contents/heading_tree_builder.rb +41 -0
  120. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +46 -0
  121. data/lib/govuk_tech_docs/table_of_contents/headings_builder.rb +39 -0
  122. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +79 -0
  123. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +34 -0
  124. data/lib/govuk_tech_docs/unique_identifier_extension.rb +13 -0
  125. data/lib/govuk_tech_docs/unique_identifier_generator.rb +72 -0
  126. data/lib/govuk_tech_docs/version.rb +3 -0
  127. data/lib/govuk_tech_docs/warning_text_extension.rb +23 -0
  128. data/lib/source/api/pages.json.erb +1 -0
  129. data/lib/source/favicon.ico +0 -0
  130. data/lib/source/images/anchored-heading-icon-2x.png +0 -0
  131. data/lib/source/images/anchored-heading-icon.png +0 -0
  132. data/lib/source/images/gov.uk_logotype_crown-2x.png +0 -0
  133. data/lib/source/images/gov.uk_logotype_crown.png +0 -0
  134. data/lib/source/images/gov.uk_logotype_crown_invert_trans.png +0 -0
  135. data/lib/source/images/govuk-crest-2x.png +0 -0
  136. data/lib/source/images/govuk-crest.png +0 -0
  137. data/lib/source/images/govuk-icn-close.png +0 -0
  138. data/lib/source/images/govuk-icn-close@2x.png +0 -0
  139. data/lib/source/images/govuk-icn-numbered-list.png +0 -0
  140. data/lib/source/images/govuk-icn-numbered-list@2x.png +0 -0
  141. data/lib/source/images/open-government-licence.png +0 -0
  142. data/lib/source/images/open-government-licence_2x.png +0 -0
  143. data/lib/source/images/search-result-caret.svg +13 -0
  144. data/lib/source/layouts/_analytics.erb +15 -0
  145. data/lib/source/layouts/_footer.erb +10 -0
  146. data/lib/source/layouts/_header.erb +44 -0
  147. data/lib/source/layouts/_page_review.erb +22 -0
  148. data/lib/source/layouts/_search.erb +16 -0
  149. data/lib/source/layouts/core.erb +82 -0
  150. data/lib/source/layouts/layout.erb +18 -0
  151. metadata +474 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 15e8faf0fa987026cd291cbf0eaa5b2b962d4856
4
+ data.tar.gz: 6347f8673da6972206dcdd3cc4236ff5ffa26244
5
+ SHA512:
6
+ metadata.gz: 9d1b07ce838ab225aa19ec2513e9b1d8e7f01fa72427ca9ebbac8227151b3380988c074bcfef46cc235c119afbcaaf104f14baabe0756a2e614612de99bb4e5c
7
+ data.tar.gz: 1e3a0cb054def4f45ea8257c6c0d95bb769313f9dfcf491d431ff4f92bdb08668304cef8746b4a3df9c264efa0086b37c547597c6b59aed520a73524c99de7b3
@@ -0,0 +1,29 @@
1
+ # EditorConfig is awesome: http://EditorConfig.org
2
+ # https://gds-way.cloudapps.digital/manuals/programming-languages/editorconfig
3
+
4
+ # top-most EditorConfig file
5
+ root = true
6
+
7
+ [*.java]
8
+ indent_style: space
9
+ indent_size: 4
10
+ end_of_line: lf
11
+ charset: utf-8
12
+ insert_final_newline: true
13
+ continuation_indent_size: 8
14
+
15
+ [*.{scss,erb}]
16
+ charset = utf-8
17
+ end_of_line = lf
18
+ indent_style = space
19
+ indent_size = 2
20
+ insert_final_newline = true
21
+ trim_trailing_whitespace = true
22
+
23
+ [*.{js,json}]
24
+ charset = utf-8
25
+ end_of_line = lf
26
+ indent_style = space
27
+ indent_size = 2
28
+ insert_final_newline = true
29
+ trim_trailing_whitespace = true
@@ -0,0 +1,37 @@
1
+ ### Ruby ###
2
+ *.gem
3
+ *.rbc
4
+ /.config
5
+ /coverage/
6
+ /InstalledFiles
7
+ /pkg/
8
+ /spec/reports/
9
+ /spec/examples.txt
10
+ /test/tmp/
11
+ /test/version_tmp/
12
+ /tmp/
13
+
14
+ # Used by dotenv library to load environment variables.
15
+ # .env
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalization:
24
+ /.bundle/
25
+ /vendor/bundle
26
+ /lib/bundler/man/
27
+
28
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
29
+ .rvmrc
30
+
31
+ /example/build
32
+ /example/.sass-cache
33
+
34
+ Gemfile.lock
35
+
36
+ # Ignore .DS_store file
37
+ .DS_Store
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,11 @@
1
+ Layout/IndentHeredoc:
2
+ Enabled: false
3
+
4
+ Naming/HeredocDelimiterNaming:
5
+ Enabled: false
6
+
7
+ Lint/NestedMethodDefinition:
8
+ Enabled: false
9
+
10
+ Performance/HashEachMethods:
11
+ Enabled: false
@@ -0,0 +1 @@
1
+ 2.4.2
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ deploy:
3
+ provider: rubygems
4
+ gem: govuk_tech_docs
5
+ api_key:
6
+ secure: CY9C+IUqUeYWqXSyQgfF5swdYw1rRtYi0ai1xasD3R5rwARF6Qr8CnmdSBjfT2S84fXQiMza45Jto4w1jiy3o4wpxuKN68xEB7J4W/YEpFcZectzsmXwcMJH+DXh720KFIX2xiHaG5N0nWzAoV+6zgw6Vq24IXYE33wO6BgCmTe3vtO+Apg0+wDRAOuJ4T5XfSyWUvG8JqLRb81t+WbrsOLcUgZn24DHvs+lrjXTDDTzrgwTuKeaKd+h+mfxlHZD+Xxbcy624qop5ICwOOP0koRXCdVmTOSZ4mNI10+loCyA1B5Tryj/2wweyc8CanqRMniF8p/BxLV1sAwihpCmCpuWUyxq2pTPSgjF1A1f5hXwkAT/HiaXLzXKyO1REnbtLHYvre10EIYIII4nDAtCZP0YLYvPoKQUrAydeWiQ4jL+cyEeN/8Dznx2OPrhcwxazsElMm0yOZDNXERNIf3IVnQshxMFxQfGW3NTG8XR4l5PHAI2XqKy/O/VGbiRcNV3EYVG5w/KumB698BGDGV2QPOlh3JOEkebXTGDsMJj/gzZik2BtvAqYatwgx7oiYzvhEPz0m9o/DTS7Gf/5Hkj3iV2mpcNtRMc0HKmS7bwkv8Cl6dWECt7PWQ8Kz5ttrCKRmTCJDgra2xLFuV8kbBISPkKKv87KCXzxthM8ps94WE=
7
+ on:
8
+ repo: alphagov/tech-docs-gem
9
+ branch: master
@@ -0,0 +1,274 @@
1
+ # Changelog
2
+
3
+ ## 1.8.2
4
+
5
+ Adds a `show_expiry` config option to allow you to choose whether to show the review due date and expired banner from your pages. Find out more about the [page expiry and review feature][expiry].
6
+
7
+ [expiry]: https://tdt-documentation.london.cloudapps.digital/page-expiry.html#page-expiry-and-review
8
+
9
+ ## 1.8.1
10
+
11
+ This release fixes a bug (#79 - reported in
12
+ [alphagov/tech-docs-template#183][tdt-183]) which prevented a multipage site
13
+ from being generated when a custom `http_prefix` was configured.
14
+
15
+ [tdt-183]: https://github.com/alphagov/tech-docs-template/issues/183
16
+
17
+ ## 1.8.0
18
+
19
+ 🎉 Our first contributor from outside of GDS. Thanks [@timja](https://github.com/timja) from [HMCTS](https://hmcts.github.io)! 🤝
20
+
21
+ New features: you can now configure a different GitHub branch for the repo to generate the "View source" link in the footer. Use `github_branch` in your config file (#71). You can also specify a `full_service_name` in the config, which is used in the browser title and meta tags (#72).
22
+
23
+ This version also fixes a bug with unclickable links (#74 - reported in [alphagov/tech-docs-template#123](https://github.com/alphagov/tech-docs-template/issues/123)).
24
+
25
+ ## 1.7.0
26
+
27
+ New features: this release adds support for a full-width page (#63) and adding HTML to the `head` of the page (#64).
28
+
29
+ This release also makes sure that all pages are returned in the `/api/pages.json` endpoint (#66).
30
+
31
+ ## 1.6.3
32
+
33
+ The gem now uses `middleman-search-gds` rather than `middleman-search`, which
34
+ removes the need for projects to point to the alphagov github repository in
35
+ their Gemfiles. We will continue to maintain our own fork until the changes
36
+ are merged into the upstream project.
37
+
38
+ ## 1.6.2
39
+
40
+ This version fixes an issue with Middleman hanging (PR #54). It also allows the API reference page to include multiple servers and their descriptions (PR #53).
41
+
42
+ ## 1.6.1
43
+
44
+ ### Make `api_path` configuration optional
45
+
46
+ A bug in the previous release prevented the docs from being generated if
47
+ `api_path` was missing. This is now fixed.
48
+
49
+ ## 1.6.0
50
+
51
+ Version 1.6.0 adds API reference generation, and improves the search function.
52
+
53
+ ### New feature: API reference
54
+
55
+ Specify an OpenAPI spec file using `api_path`, for example: `api_path: source/pets.yml`.
56
+
57
+ To output the generated content in the page of your choice, write `api>` in any markdown parsed file (.md, .html.md, .html.md.erb). You can also specify to just print a specific path: `api> /pets`
58
+
59
+ This generates request and response schemas and examples for each API operation.
60
+
61
+ More info:
62
+
63
+ - https://github.com/alphagov/tech-docs-gem/pull/40
64
+ - https://github.com/alphagov/tech-docs-gem/pull/48
65
+
66
+ ### Search result improvements
67
+
68
+ The search indexing pipeline has been tweaked to provide expected results. The display of the search results has also been
69
+
70
+ If you're using search then you'll need to add this line to your project `Gemfile`:
71
+
72
+ ```
73
+ gem 'middleman-search', git: 'git://github.com/alphagov/middleman-search.git'
74
+ ```
75
+
76
+ More info:
77
+ - https://github.com/alphagov/tech-docs-gem/pull/37
78
+ - https://github.com/alphagov/tech-docs-gem/pull/38
79
+ - https://github.com/alphagov/tech-docs-gem/pull/41
80
+ - https://github.com/alphagov/tech-docs-gem/pull/42
81
+ - https://github.com/alphagov/tech-docs-gem/pull/43
82
+
83
+ ### Correct fork of middleman in example project
84
+
85
+ The example gem project now uses alphagov/middleman-search. This prevents `bundle exec middleman serve` from crashing.
86
+
87
+ More info:
88
+ - https://github.com/alphagov/tech-docs-gem/pull/35
89
+
90
+ ### Accessibility improvements
91
+
92
+ Accessibility improvements to search, collapsible navigation, and the logo.
93
+
94
+ More info:
95
+ - https://github.com/alphagov/tech-docs-gem/pull/36
96
+ - https://github.com/alphagov/tech-docs-gem/pull/33
97
+
98
+ ### Additional configuration options for review system
99
+
100
+ `default_owner_slack` and `owner_slack_workspace` are now configurable for use within the review system.
101
+
102
+ More info:
103
+ - https://github.com/alphagov/tech-docs-gem/pull/47
104
+
105
+ ### Correct fork of middleman in example project
106
+
107
+ The example gem project now uses alphagov/middleman-search. This prevents `bundle exec middleman serve` from crashing.
108
+
109
+ More info:
110
+ - https://github.com/alphagov/tech-docs-gem/pull/35
111
+
112
+ ### Accessibility improvements
113
+
114
+ Accessibility improvements to search, collapsible navigation, and the logo.
115
+
116
+ More info:
117
+ - https://github.com/alphagov/tech-docs-gem/pull/36
118
+ - https://github.com/alphagov/tech-docs-gem/pull/33
119
+
120
+ ### Search result improvements
121
+
122
+ The search indexing pipeline has been tweaked to provide expected results. The display of the search results has also been improved.
123
+
124
+ If you're using search then you'll need to add this line to your project `Gemfile`:
125
+
126
+ ```
127
+ gem 'middleman-search', git: 'git://github.com/alphagov/middleman-search.git'
128
+ ```
129
+
130
+ More info:
131
+ - https://github.com/alphagov/tech-docs-gem/pull/37
132
+ - https://github.com/alphagov/tech-docs-gem/pull/38
133
+ - https://github.com/alphagov/tech-docs-gem/pull/41
134
+ - https://github.com/alphagov/tech-docs-gem/pull/42
135
+ - https://github.com/alphagov/tech-docs-gem/pull/43
136
+
137
+ ## 1.5.0
138
+
139
+ ### New feature: Search
140
+
141
+ Adds search functionality. This indexes pages only and is not recommended for single-page sites. To enable write `enable_search: true` in in tech-docs.yml.
142
+
143
+ More info:
144
+ - https://github.com/alphagov/tech-docs-gem/pull/28
145
+
146
+ ### Google Analytics tracking for old headings
147
+
148
+ An event category 'Broken fragment ID' will be pushed to Google Analytics when a user lands on a page with a URL that points to a fragment ID that does not exist on the page.
149
+
150
+ More info:
151
+ - https://github.com/alphagov/tech-docs-gem/pull/30
152
+
153
+ ## 1.4.0
154
+
155
+ Adds multiple page navigation support and collapsible top level navigation
156
+ items. When enabled the table of contents will display other pages on the site.
157
+
158
+ More info:
159
+ - https://github.com/alphagov/tech-docs-gem/pull/27
160
+
161
+ ## 1.3.1
162
+
163
+ Minor update to Google Analytics tracking
164
+
165
+ More info:
166
+ - https://github.com/alphagov/tech-docs-gem/pull/25
167
+
168
+ ## 1.3.0
169
+
170
+ Version 1.3.0 contains accessibility fixes (#20) and a fix to make the
171
+ site more robust when certain options aren't set in the configs (#17).
172
+
173
+ ### New feature: passing options to `GovukTechDocs.configure`
174
+
175
+ You can now pass options into `GovukTechDocs.configure` for the `livereload`
176
+ extension.
177
+
178
+ ```rb
179
+ GovukTechDocs.configure(self, livereload: { js_host: 'localhost' })
180
+ ```
181
+
182
+ See PR #18.
183
+
184
+ ### New feature: page parents
185
+
186
+ You can now specify a page’s parent in its frontmatter. This affects
187
+ which item is selected in the navigation.
188
+
189
+ More info:
190
+
191
+ - https://github.com/alphagov/tech-docs-gem/pull/19
192
+ - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#parent
193
+
194
+ ## 1.2.0
195
+
196
+ ### New feature: redirects
197
+
198
+ You can now specify redirects in the frontmatter and `config/tech-docs.yml`.
199
+
200
+ You can use this when you change a page URL.
201
+
202
+ More info:
203
+
204
+ - https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#redirects
205
+ - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#old_paths
206
+
207
+ ### New feature: contribution banner
208
+
209
+ You can now show a block at the bottom of the page that links to
210
+ the page source on GitHub, so readers can easily contribute back to the documentation.
211
+
212
+ https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#show_contribution_banner
213
+
214
+ ### New feature: page review system
215
+
216
+ An optional page review system to make sure documentation stays up to date.
217
+
218
+ More info:
219
+
220
+ - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#last_reviewed_on
221
+ - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#owner_slack
222
+
223
+
224
+ ### Better meta tags
225
+
226
+ Pages now include better meta tags for search engines, Twitter, Facebook and Slack to pick up.
227
+
228
+ ## 1.1.0
229
+
230
+ You can now specify `google_site_verification` in tech-docs.yml. You can use
231
+ this to verify your site in Google Webmaster tools.
232
+
233
+ https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#google_site_verification
234
+
235
+ ## 1.0.0
236
+
237
+ The first release of the template as a gem. Most CSS, JS, images and layouts are
238
+ now imported from the gem and can be removed from your project.
239
+
240
+ The following script upgrades your project. This will work if you've not made
241
+ any modifications to the files distributed by the template. If you have, you'll
242
+ need to port your changes back in.
243
+
244
+ ```sh
245
+ rm -rf lib source/images source/layouts source/favicon.ico source/javascripts/* source/stylesheets/*
246
+
247
+ echo "//= require govuk_tech_docs" > source/javascripts/application.js
248
+ echo "@import 'govuk_tech_docs';" > source/stylesheets/screen.css.scss
249
+
250
+ echo '$is-print: true;
251
+
252
+ @import "govuk_tech_docs";' > source/stylesheets/print.css.scss
253
+
254
+ echo '$is-ie: true;
255
+ $ie-version: 8;
256
+
257
+ @import "govuk_tech_docs";' > source/stylesheets/screen-old-ie.css.scss
258
+
259
+ echo "require 'govuk_tech_docs'
260
+
261
+ GovukTechDocs.configure(self)" > config.rb
262
+
263
+ echo "source 'https://rubygems.org'
264
+
265
+ # For faster file watcher updates on Windows:
266
+ gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
267
+
268
+ # Windows does not come with time zone data
269
+ gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
270
+
271
+ gem 'govuk_tech_docs'" > Gemfile
272
+
273
+ bundle install
274
+ ```
@@ -0,0 +1,9 @@
1
+ ## Contributing to this project
2
+
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
+
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 option in docs/configuration.md](docs/configuration.md)
7
+ - If you add a new option to the page frontmatter, make sure you [document the option in docs/frontmatter.md](docs/frontmatter.md)
8
+ - You can test your contribution using [unit tests](spec/govuk_tech_docs), [javascript tests](spec/javascripts) or [integration tests](spec/features)
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.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in govuk_tech_docs.gemspec
4
+ gemspec
data/LICENCE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Crown Copyright (Government Digital Service)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,89 @@
1
+ # Tech Docs Template - gem
2
+
3
+ This repo contains the Ruby gem that distributes the [Tech Docs Template][tdt-template]. The Tech Docs Template is a [middleman template][mmt] that
4
+ you can use to build technical documentation using a DSS style. This repository will age quickly as there is no attempt to keep this in sync with the published GEM. This repository was created on 25th April 2019.
5
+
6
+ 👉 Find out more about the template and its features from the [Tech Docs Template documentation][tdt-docs].
7
+
8
+ ## Usage
9
+
10
+ 👉 Find out how to [generate a new website with the Tech Docs Template][tdt-readme].
11
+
12
+ ## Contributing
13
+
14
+ Everybody who uses this project is encouraged to contribute.
15
+
16
+ 👉 [See CONTRIBUTING.md](CONTRIBUTING.md) for guidance on making changes.
17
+
18
+ ## Developing locally
19
+
20
+ There are 2 ways to develop with this gem. You can see your changes on either:
21
+
22
+ - your own Tech Docs Template website
23
+ - the example in this repository
24
+
25
+ ### Use your own Tech Docs Template website
26
+
27
+ If you want to see how your changes to the gem affect your website, you have to point your site's Gemfile to your local checkout:
28
+
29
+ ```rb
30
+ gem 'govuk_tech_docs', path: '../tech-docs-gem'
31
+ ```
32
+
33
+ To view your changes locally run:
34
+
35
+ ```sh
36
+ bundle exec middleman server
37
+ ```
38
+
39
+ See your website on `http://localhost:4567` in your browser.
40
+
41
+ ### Use the example in this repo
42
+
43
+ To start the example in this repo, run:
44
+
45
+ ```sh
46
+ cd example
47
+ bundle install
48
+ bundle exec middleman server
49
+ ```
50
+
51
+ See your website on `http://localhost:4567` in your browser.
52
+
53
+ ## Tests
54
+
55
+ The repository contains automated JavaScript tests that use [Jasmine][jas] test framework.
56
+
57
+ To run the tests and see the results in your browser:
58
+
59
+ 1. Run `bundle exec rake jasmine`
60
+ 2. Go to `http://localhost:8888` in your browser
61
+
62
+ To run the tests and see the results in your terminal, run:
63
+
64
+ ```
65
+ bundle exec rake jasmine:ci
66
+ ```
67
+
68
+ ## Releasing new versions
69
+
70
+ To release a new version, create a new Pull Request that updates [version.rb](lib/govuk_tech_docs/version.rb) and [CHANGELOG.md](CHANGELOG.md). Don't mix this in with other changes - this makes it easier to find out what was released when. See [this PR to release a new version as an example](https://github.com/alphagov/tech-docs-gem/pull/15).
71
+
72
+ Travis will automatically release a [new version to Rubygems.org](https://rubygems.org/gems/govuk_tech_docs).
73
+
74
+ ## Licence
75
+
76
+ Unless stated otherwise, the codebase is released under [the MIT License][mit].
77
+ This covers both the codebase and any sample code in the documentation.
78
+
79
+ The documentation is [© Crown copyright][copyright] and available under the terms of the [Open Government 3.0][ogl] licence.
80
+
81
+ [mit]: LICENCE
82
+ [copyright]: http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/
83
+ [ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
84
+ [tdt-docs]: https://tdt-documentation.london.cloudapps.digital
85
+ [tdt-template]: https://github.com/alphagov/tech-docs-template
86
+ [tdt-readme]: https://github.com/alphagov/tech-docs-template/blob/master/README.md
87
+ [mmt]: https://middlemanapp.com/advanced/project_templates/
88
+
89
+ [jas]: https://jasmine.github.io/