Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 1.98 KB

README.md

File metadata and controls

56 lines (33 loc) · 1.98 KB

GOV.UK Eleventy starter kit

This is a basic 11ty website that includes everything from GOV.UK Frontend.

You can copy and paste code samples straight from the GOV.UK design system.

It should be great for prototypes, but might also be suitable for some small, simple production services as well.

🧠 Anatomy

The main folder is /pages where HTML pages live.

Layouts are in the /_includes subfolder. Choose which layout you want to use by changing the lines at the top of the files:

---
title: My first page
layout: default
---

You can copy and paste code samples from the GOV.UK design system into these.

Other folders you might see:

  • /assets images and font files needed by the site live in here
  • /javascript you can write custom JavaScript in here
  • /styles you can style your website using SCSS here

👩‍💻 Using it

Open it in CodeSandbox

You need node.js installed for this to work.

Check if you have it by running node -v in your terminal.

If you do, run these commands:

npm install
npm run dev

It should be available in your browser at http://localhost:8080.

🛰 Putting it on the web

Deploy to Netlify

If you run npm run build in your terminal, it will build a set of HTML webpages to the /_site folder that are ready to publish on the web.

It's suitable for any static file host, like Netlify.

Netlify brings lots of handy enhancements, such as quick forms. You'll struggle to make multi-page forms - a GOV.UK staple, this way though.