Skip to main content

Using Markdown and the templates

Set up a design history using one of the templates and write posts in Markdown.

The design history templates make it easy to:

Both templates are built using the Eleventy static site generator, meaning your design history site can be adapted as a service grows.

Install

Choose the template that matches your service:

On the template’s GitHub page, click ‘Use this template’ to make a copy. You’ll be asked to choose a GitHub user or organisation that should own this new repository, and a name for your copy.

To start making changes, you’ll need to download the repository to your own computer. Assuming your GitHub user is my-username, and you called your repository my-service-design-history, using the Terminal you would type:

git clone git@github.com:my-username/my-service-design-history.git

Install Node.js 26.13.0 or later. Then change into the downloaded folder, and install all the dependencies needed to run the design history project. Do this by typing the following:

cd my-service-design-history
npm install

Preview

Before uploading your design history to a public URL, it can be useful to preview it locally, on your own computer. To do this type:

npm start

Once all the files have been generated, a URL will be shown which you can enter into your browser’s address bar (usually this is http://localhost:8080).

Whenever you add a new post, or edit an existing post, the browser will automatically refresh the page with any changes applied.

Customise

Before adding posts, you’ll probably want to customise a few things for the site to make sense for your service.

Change the name of the website

  1. Open the file eleventy.config.js
  2. Change the name in the header options:
    • for the GOV.UK template, change header.productName
    • for the NHS.UK template, change header.service.text

You can also customise other aspects of the header. See the options for the GOV.UK Eleventy Plugin or NHS.UK Eleventy Plugin.

Update the homepage

  1. Open the file app/index.md
  2. Change the value shown for title. The value you give here is used for the large heading shown at the top of the page
  3. Change the value shown for description. The value you give here is used for the text that appears below the title. You can also remove this line if you don’t want to show anything here.

If you want to link to other tools your team uses, you can place these in the footer.

  1. Open the file eleventy.config.js
  2. Within the plugin options, add values for the footer option. This takes the same values as the footer component in the relevant design system, allowing you to add navigation sections and links.

You can also change the copyright statement and content licence. See the plugin options for GOV.UK or NHS.UK.

Document

You’re now ready to start documenting your designs. To add a new post:

  1. Create a folder for your post in app/posts, then create an index.md file inside it. Use dashes instead of spaces in the folder name.

    For example, app/posts/first-designs/index.md creates <your-design-history>/posts/first-designs/ in either template.

  2. Posts are made up of 2 parts: a front matter and its contents.

    A front matter starts and ends with --- and is written using a key/value data format called YAML. In most cases, you will only need three bits of information: title, description and date. For example:

    ---
    title: First designs for a minimum viable service
    description: A minimum viable service that could allow the providers to access and manage their ITT applications.
    date: 2020-02-19
    ---
    

    The content portion of a post uses Markdown, a lightweight markup language used to add formatting elements to plaintext text documents. You can learn more about writing Markdown with this guide.

  3. Put any images in the same folder as the post. You can include an image in the post using its filename:

    ![Description of the image](first-design.png)
    

    See how to add screenshots to a post for another way to display a series of images.

  4. Save the file, and visit the browser. You should see your new post listed on the home page.

When you’re ready to share your design history, find out about publishing the site.