πŸ“– Tech docs for everyone working on GOV.UK
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Use search, expiry feature and layouts from gem Feb 7, 2019
bin Speed up site build Feb 13, 2019
config Use search, expiry feature and layouts from gem Feb 7, 2019
data Rename cdn-configs to govuk-cdn-config-secrets Feb 13, 2019
helpers Use search, expiry feature and layouts from gem Feb 7, 2019
source Merge pull request #1541 from alphagov/2nd-line-docs-update- Feb 18, 2019
spec Use search, expiry feature and layouts from gem Feb 7, 2019
styles/PlainLanguage Add pre-commit hook Nov 21, 2017
.gitignore Add simplecov gem Apr 10, 2017
.pre-commit-config.yaml Add pre-commit hook Nov 21, 2017
.rspec Add rspec setup Dec 14, 2016
.rubocop.yml Exclude /vendor on CI Mar 8, 2017
.ruby-version Update .ruby-version to 2.6.1 Feb 18, 2019
.template_version Update to the latest version of the template Mar 7, 2018
.vale Add ValeLint to CI Feb 16, 2018
Gemfile Use search, expiry feature and layouts from gem Feb 7, 2019
Gemfile.lock Update Gemfile.lock to 2.6.1 Feb 18, 2019
Jenkinsfile Update Jenkinsfile to use external library Mar 2, 2018
LICENSE.md Add a license Apr 26, 2016
README.md Speed up site build Feb 13, 2019
Rakefile Speed up site build Feb 13, 2019
app.json Use the new repo name Dec 21, 2016
config.rb Use search, expiry feature and layouts from gem Feb 7, 2019
config.ru Add govuk-lint Mar 8, 2017
startup.sh Speed up site build Feb 13, 2019
vale-lint.sh Add pre-commit hook Nov 21, 2017

README.md

GOV.UK Developer Docs

πŸ‘‰ https://docs.publishing.service.gov.uk

Technical documentation

This is a static site generated with Middleman.

Tech docs template

This project uses alphagov/tech-docs-template.

This means that some of the files (like the CSS, javascripts and layouts) are managed in the template and are not supposed to be modified here. Any project-specific Ruby code needs to go into /app.

You can pull down the latest version of the template by running:

bin/update

Dependencies

  • Ruby

Running locally

The first time you'll need to bundle:

bundle install

To run the app locally:

./startup.sh

The app will appear at http://localhost:4567/

You may need a GitHub auth token if you find yourself rate limited. You can create one here:

https://github.com/settings/tokens/new

It doesn't need any permissions.

Use it like this:

export GITHUB_TOKEN=somethingsomething
./startup.sh

Building the project

Build the site with:

NO_CONTRACTS=true bundle exec middleman build

This will create a bunch of static files in /build.

Deployment

This project is re-deployed by a Jenkins task every hour (to pick up external changes). It is hosted on S3.

Pre-commit hooks

There are pre-commit hooks available to help when creating or editing markdown.

Install pre-commit:

Homebrew:

brew install pre-commit pre-commit install

Pip:

pip install pre-commit

Install vale linter:

Homebrew:

brew tap ValeLint/vale brew install vale

Install the binary:

Download the latest release.

wget https://github.com/ValeLint/vale/releases/download/0.9.0/vale_0.9.0_Linux_64-bit.tar.gz tar zxvf vale_0.9.0_Linux_64-bit.tar.gz chmod +x vale && mv vale /usr/local/bin/vale

Licence

MIT License