Gem to distribute the tech docs project
Clone or download
jonathanglassman Merge pull request #66 from alphagov/pages-json-include-more
Less stringent filtering for populating pages.json
Latest commit afd3d25 Jan 11, 2019

README.md

Tech Docs Template - gem

This repo is part of the GOV.UK Tech docs project. This repo contains the Ruby gem that is used to distribute most of code that is used to generate the site.

👉 See alphagov.github.io/tech-docs-manual

Usage

To generate a new site with the template, see the manual.

Contributing

👉 See CONTRIBUTING.md

Developing locally

There are 2 ways to develop with this gem.

The first is to point your site's Gemfile to your local checkout, and use it normally. This is good for if you want to see what effect your changes have to the actual site.

gem 'govuk_tech_docs', path: '../tech-docs-gem'

The second is to use the example app in this repo. You can start it by

cd example
bundle install
bundle exec middleman serve

Your site will appear on http://localhost:4567.

Tests

We have some automated JavaScript tests that use Jasmine as a test framework.

To run the tests on your machine:

  • Run bundle exec rake jasmine
  • Navigate to http://localhost:8888 in a browser of your choosing
  • Peruse the output of your tests

Or, on the command line, run bundle exec rake jasmine:ci.

Releasing new versions

At the moment this gem has to be released manually. There's a story on the Reliability Engineering backlog to automate this.

To release a new version, create a new Pull Request that updates version.rb and 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.

Owners of the Rubygem can then run rake release to release a new version.

License

The gem is available as open source under the terms of the MIT License.