A place for services within digital prevention services to document their design decisions and research learnings.
- Clone the repo to a folder on your computer
- In your terminal,
cdto the folder - Run
npm installto install pre-requisites - Run
npm startto build the design history site and serve it - View the site locally at
localhost:8080
To add a new service, there is some set up involved.
You will need to create some files and folders based on the name of your service, using lowercase and hyphens. For example your-service-name.
You’ll need to:
- create a Markdown file in
app/posts/, for exampleapp/posts/your-service-name.md. Copy an existing example and update any references to match your service. - create a folder for your service in
app/images/, for exampleapp/images/your-service-name/ - create a folder for your service in
app/posts/, for exampleapp/posts/your-service-name/ - inside your service’s post folder, create a JSON file
your-service-name.json, for exampleapp/posts/your-service-name/your-service-name.json. Copy an existing example for what to put in it. - update
eleventy.config.jsto create a new ‘collection’ for your service (copy one of the existing examples) - update
app/_layouts/_product.njkto list your new service in the sections variable - open a pull request with your changes
See Divide a design history into different sections.
You have two choices for adding a post:
-
Draft your design history post - it’s often easiest to do this in SharePoint
-
Create a new markdown file in
app/posts/[service-name]/YYYY/MM/[post-name].mdIt’s often easier to duplicate an existing post as that will have the headers you need
-
Edit the post with your content - make sure it has a title, subtitle, and date
-
If you have images, add them to a folder in
app/images/[service-name]/YYYY/MM/[post-name]/ -
Make a pull request with your changes and get it reviewed
View more details on the scripts here.
- Use a PNG optimiser like TinyPNG to reduce the file size of your images.
- Create a folder for your images and put them in
app/images/[service-name]/YYYY/MM/[post-name]/ - From the terminal, run
node scripts/generate.js [path]wherepathis the full path to the folder of images. The easiest way to do this is to typenode scripts/generate.jsand then drag the folder from Finder on to your terminal to fill in the path. - The script will generate a new post linking to each image and place it in
app/posts/[service-name]/YYYY/MM/[post-name].md. - You should check the title text for each image and amend as needed.
- The script will prepend the post filename with the current date but you can delete this if you like.
Once you have a post you want to publish, make a pull request on this repo with your suggested change.
Once it is merged the updated design history will automatically deploy with your post.
For issues relating to the NHS Digital prevention services design history, contact Ed Horsford, Frankie Roberto or Ralph Hawkins.
The GOV.UK design history project is maintained by a small number of volunteers working across government.
For questions about using a design history for your service, bug reports or feedback, submit a new issue.
The design history uses the GOV.UK Design System and the Eleventy static site generator with the GOV.UK Eleventy Plugin.