bundle install
to install middleman and its dependenciesnpm install
to install the frontend dependenciesbundle exec middleman server
- to start middleman's built in serveropen http://localhost:4567
- to open the example in your browser
bundle install
npm install
bundle exec middleman build
Check the build
directory for the output.
Look at the CSS for the individual components for usage examples and notes.
- Breadcrumbs
- Content Section
- Full Width Form
- GOV.UK Logo
- Header
- Hero 'Alternative Action'
- Hero Button
- Masthead
- Phase Banner
- Related Items
- Skip Link
- Sub Navigation
The command line script github-release
allows you to easily build an artifact containing the generated static site and publish it on GitHub in a format that makes it suitable for use as a Node.js dependency.
Using the GitHub API, the script creates a new release from master
with an associated tag. On your local machine, it then builds a static version of the site (using middleman
) from your working copy, adds a package.json
file (which makes it a Node.js module) inside the resulting build
directory, tar
s and gzip
s the build
directory, then attaches the gzipped tarball as a binary to the release in GitHub, where it appears alongside the source code downloads on the releases page. This artifact is available over HTTPS and can be used as a dependency in a Node.js project.
In order to run the script, you need to declare an environment variable called GITHUB_TOKEN
containing your GitHub authentication token:
GITHUB_TOKEN=xxx
Then you can run the script:
bin/github-release --version 1.0.1 publish
The --version
argument specifies the version of the new release (pick something sensible based on the previous releases). This version number is used for the release version, tag name, version
property in the package.json
and as part of the file name for the binary.
The script is bash and has no dependencies other than curl
and those necessary for middleman
.