Technical documentation for GOV.UK Pay
Branch: master
Clone or download
rhowe-gds Merge pull request #272 from alphagov/dependabot/bundler/govuk_tech_d…
…ocs-1.8.0

Bump govuk_tech_docs from 1.7.0 to 1.8.0
Latest commit 3e9d2d8 Feb 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Adds templates for issues and pull requests on GitHUb Aug 13, 2018
config Add Direct Debit documentation section and amend API reference. Alter Jan 12, 2019
script Update PaaS deployment target Dec 15, 2016
source
.cfignore PP-2481 Making tech-docs publishable in PaaS Aug 9, 2017
.gitignore PP-2481 Making tech-docs publishable in PaaS Aug 9, 2017
.ruby-version Add link to new tech doc tool docs Jan 16, 2019
.template_version
Gemfile
Gemfile.lock Bump govuk_tech_docs from 1.7.0 to 1.8.0 Feb 14, 2019
Jenkinsfile PP-2481 Making tech-docs publishable in PaaS Aug 9, 2017
LICENCE Adding a licence Aug 17, 2017
README.md Add link to new tech doc tool docs Jan 16, 2019
build.sh Vendor bundled Gems so not to pollute system gems Aug 9, 2017
config.rb
deploy-to-test.sh PP-4010 Add script to deploy to test Jul 18, 2018
deploy.sh
manifest.yml use correct manifest.yml file Sep 6, 2018
nginx.conf Import tech docs template Dec 15, 2016
requirements.txt

README.md

Technical Documentation

Getting started

You can read documentation about the GDS technical documentation tool [external link].

To preview or build the website, we need to use the terminal.

Install Ruby with Rubygems, preferably with a Ruby version manager, and the Bundler gem.

In the application folder type the following to install the required gems:

bundle install

Making changes

To make changes edit the source files in the source folder.

Although a single page of HTML is generated the markdown is spread across multiple files to make it easier to manage. They can be found in source/documentation.

A new markdown file isn't automatically included in the generated output. If we add a new markdown file at the location source/documentation/agile/scrum.md, the following snippet in source/index.html.md.erb, includes it in the generated output.

<%= partial 'documentation/agile/scrum' %>

Including files manually like this lets us specify the position they appear in the page.

Preview

Whilst writing documentation we can run a middleman server to preview how the published version will look in the browser. After saving a change the preview in the browser will automatically refresh.

The preview is only available on our own computer. Others won't be able to access it if they are given the link.

Type the following to start the server:

bundle exec middleman server

If all goes well something like the following output will be displayed:

== The Middleman is loading
== LiveReload accepting connections from ws://192.168.0.8:35729
== View your site at "http://Laptop.local:4567", "http://192.168.0.8:4567"
== Inspect your site configuration at "http://Laptop.local:4567/__middleman", "http://192.168.0.8:4567/__middleman"

You should now be able to view a live preview at http://localhost:4567.

Build

If you want to publish the website without using a build script you may need to build the static HTML files.

Type the following to build the HTML:

bundle exec middleman build

This will create a build subfolder in the application folder which contains the HTML and asset files ready to be published.

Updating the template

You can update to the latest version of [tech-docs-template][] by running:

bundle update govuk_tech_docs

Read the changelog for the gem for the latest changes.