Skip to content

Commit

Permalink
Merge branch 'master' into fix-multipage-nav-toc
Browse files Browse the repository at this point in the history
  • Loading branch information
odlp authored Sep 30, 2020
2 parents 4fabee6 + 210d3d4 commit 9eba0af
Show file tree
Hide file tree
Showing 132 changed files with 3,886 additions and 3,894 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@
/example/.sass-cache

Gemfile.lock
node_modules
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.16.0
9 changes: 5 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Layout/IndentHeredoc:
inherit_gem:
rubocop-govuk:
- config/default.yml

Layout/HeredocIndentation:
Enabled: false

Naming/HeredocDelimiterNaming:
Enabled: false

Lint/NestedMethodDefinition:
Enabled: false

Performance/HashEachMethods:
Enabled: false
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.2
2.6.3
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
language: ruby
before_install:
- gem update --system
- gem install bundler
before_script:
- npm install
deploy:
provider: rubygems
gem: govuk_tech_docs
Expand Down
115 changes: 115 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,120 @@
# Changelog

## Unreleased

## 2.1.0

### New features

#### Exclude pages from search engine results

You can now exclude a page from search engine results by including `prevent_indexing: true` in the page's frontmatter.

This was added in [pull request #192: Fixes and improvements to meta tags](https://github.com/alphagov/tech-docs-gem/pull/192).

### Fixes

We’ve made fixes in the following pull requests:

- [#192: Fixes and improvements to meta tags](https://github.com/alphagov/tech-docs-gem/pull/192)

## 2.0.13

- [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)

## 2.0.12

- [Pull request #179: Use current markup for header and footer](https://github.com/alphagov/tech-docs-gem/pull/179)
- [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.
- [Pull request #176: Use correct separator for page titles](https://github.com/alphagov/tech-docs-gem/pull/176)

## 2.0.11

### Fixes

- [Pull request #162: Fix line height spacing for multiline code elements](https://github.com/alphagov/tech-docs-gem/pull/162)
- [Pull request #165: Update header alignment to match layout](https://github.com/alphagov/tech-docs-gem/pull/165)

## 2.0.10

### Fixes

- [Pull request #160: Make sure IDs on collapsible navigation are unique](https://github.com/alphagov/tech-docs-gem/pull/160)

## 2.0.9

### Fixes

- [Pull request #154: Fix table columns breaking content](https://github.com/alphagov/tech-docs-gem/pull/154).
- [Pull request #155: Ensure the page can be pinch to zoomed](https://github.com/alphagov/tech-docs-gem/pull/155).

## 2.0.8

Use of `govuk-lint` replaced with `rubocop-govuk` due to the former [becoming deprecated](https://github.com/alphagov/govuk-lint/pull/133).

## 2.0.7

A small release to fix an issue where code blocks font size was too large on some browsers.

See [pull request #131: Improve code font sizing ](https://github.com/alphagov/tech-docs-gem/pull/131) for details.


## 2.0.6

This release contains accessibility fixes:

- anchor header links are now properly hidden to assistive technologies
- side navigation items now have consistent visible focus when tabbing between them
- side navigation items have unique Ids
- code elements now scale properly when you enlarge your text
- links with code elements now look correct
- contribution links are now within a landmark

You can look at the [2.0.6 milestone](https://github.com/alphagov/tech-docs-gem/milestone/2?closed=1) for the closed issues, and [pull request #129: Accessibility improvements](https://github.com/alphagov/tech-docs-gem/pull/129) for details on how these issues were fixed.

## 2.0.5


Adds [new global configuration option](https://github.com/alphagov/tech-docs-gem/pull/122) that controls whether review banners appear or not at the bottom of pages when expiry dates are set in the frontmatter.

[Fixes the hard-coded service link](https://github.com/alphagov/tech-docs-gem/pull/119) in the header.

Selectively include only the CSS for the GOV.UK Frontend components that we are using, to reduce the size of the CSS file served to the user ([#118](https://github.com/alphagov/tech-docs-gem/issues/118))

Fix service name to link to the configured `service_link`, rather than being hardcoded to `/` ([#119](https://github.com/alphagov/tech-docs-gem/issues/119))

Add the `show_review_banner` global configuration option allowing users to hide the page review banner.

## 2.0.4

Adds `footer_links` option for displaying links in the footer and ability to hide pages from left hand navigation.

## 2.0.3

Fixes a couple of styling issues: [#100](https://github.com/alphagov/tech-docs-gem/issues/100) and [#106](https://github.com/alphagov/tech-docs-gem/issues/106).

## 2.0.2

This fixes ensures all assets from govuk-frontend are bundled; we were missing some PNG, SVG and ICO files.

## 2.0.1

This fixes an issue where Travis CI wasn’t packaging up the gem with the govuk-frontend module.
Without this the tech-docs have no css styles.

## 2.0.0

This release adds [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend) (part of the [GOV.UK Design System](https://design-system.service.gov.uk)) and remove the legacy framework [GOV.UK Frontend Toolkit](https://github.com/alphagov/govuk_frontend_toolkit). This required a lot of markup being ported over
to use the design system’s markup and all custom CSS to use new variables and mixins.

Custom components such as the table of contents (toc) were updated to use the WCAG 2.1 AA compliant focus states too.

It was also necessary to upgrade the Ruby version to `2.6.3` so that we could bump the gem versions of `govuk_lint`, `rubocop` and `sprockets`. The new version of sprockets allowed us to pull through assets from `node_modules/govuk-frontend` without having to manually include them as was the case before with govuk_frontend_toolkit.

## 1.8.3

Fixes bug where search results disappear when opening results in a new tab, making it difficult to open several results in a batch (PR #86).

## 1.8.2

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].
Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
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.

- Before adding your feature, [check the backlog to see if someone is already talking about it](https://github.com/alphagov/tech-docs-template/issues)
- If you add a new option to `config/tech-docs.yml`, make sure you [document the option in docs/configuration.md](docs/configuration.md)
- If you add a new option to the page frontmatter, make sure you [document the option in docs/frontmatter.md](docs/frontmatter.md)
- If you add a new option to `config/tech-docs.yml`, make sure you [document the new configuration option][configuration]
- If you add a new option to the page frontmatter, make sure you [document the new frontmatter configuration](docs/frontmatter.md)
- You can test your contribution using [unit tests](spec/govuk_tech_docs), [javascript tests](spec/javascripts) or [integration tests](spec/features)
- 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.

[configuration]: https://github.com/alphagov/tdt-documentation/blob/master/source/amend_project/configuration/index.html.md.erb
[frontmatter]: https://github.com/alphagov/tdt-documentation/blob/master/source/frontmatter.html.md.erb
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Everybody who uses this project is encouraged to contribute.

👉 [See CONTRIBUTING.md](CONTRIBUTING.md) for guidance on making changes.

## GOV.UK frontend

This gem uses [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend), part of the [GOV.UK Design System](https://design-system.service.gov.uk/).

We use `npm` to download the govuk-frontend package. To update to a new version, change the version in [package.json](blob/master/package.json) and run `npm update`.

## Developing locally

There are 2 ways to develop with this gem. You can see your changes on either:
Expand Down
14 changes: 8 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'jasmine'
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require "jasmine"

RSpec::Core::RakeTask.new(:spec)

load 'jasmine/tasks/jasmine.rake'
load "jasmine/tasks/jasmine.rake"

desc "Lint Ruby and JavaScript"
task :lint do
sh "govuk-lint-ruby example lib spec Rakefile"
sh "rubocop example lib spec Rakefile"
sh "npm run lint --silent"
end

task default: ['lint', 'spec', 'jasmine:ci']
task default: ["lint", "spec", "jasmine:ci"]
Loading

0 comments on commit 9eba0af

Please sign in to comment.