UKHomeOffice / engineering-guidance-and-standards

Engineering Guidance and Standards for the Home Office
https://engineering.homeoffice.gov.uk
MIT License
18 stars 4 forks source link

Engineering Guidance and Standards

This is the home of engineering guidance and standards for the Home Office. Learn more about this project on the about page.

It is built using Markdown, GOV.UK templates, HO styles, the x-gov Eleventy Plugin and GitHub Actions.

Requirements

Installation

npm install

This will install the dependencies needed to run the site.

Preview your changes locally

Eleventy has the ability to serve the site in a hot reload environment. You can call this from the npm scripts:

npm run serve

This maps to Eleventy hot reload script 'serve'.

Alternative method for previewing changes locally

Alternatively, to run the site locally you can build the static html files and then deploy the _site folder to a http server.

Firstly you can run

npm run build

Which creates the static html. Then you can use a good very light weight http server to host them.

npm install -g http-server

Installs the server globally and then navigate to a terminal/cmd prompt to the _site directory and run:

http-server -p 8080

Now you can preview the site on http://localhost:8080

Running Cypress tests

To run the Cypress tests locally, run the following command:

npm run cypress:open

This will open up the Cypress UI, which you can use to run the end-to-end tests locally.

Note The site must be running on localhost for the tests to work. See Preview your changes locally.

Contributing

See the contributing page for details on how to contribute.