Skip to content

Commit

Permalink
Add readme and license
Browse files Browse the repository at this point in the history
Add a readme for the template itself, and a license file.
  • Loading branch information
36degrees committed Dec 12, 2016
1 parent 3d537fb commit 0933e0d
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Crown Copyright (Government Digital Service)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
60 changes: 60 additions & 0 deletions README.md
@@ -0,0 +1,60 @@
The Tech Docs Template is a [middleman][mm] [template][mmt] that
you can use to build technical documentation using a GOV.UK style.

## Creating a new documentation project

From the command line run the following commands, substituting `my-new-project`
for the name of your new project:

```bash
mkdir my-new-project
cd my-new-project
middleman init . -T alphagov/tech-docs-template
```

This will run an interactive prompt where you can set basic configuration for
your project.

Once your project has been created, avoid editing any of the following:

- `source/images/*`
- `source/javascripts/*`
- `source/layouts/*`
- `source/stylesheets/*`
- `source/favicon.ico`

as this will make it a lot harder to stay up to date with any changes made
to the template.

In order to configure things like the header, edit `config/tech-docs.yml`.

## Updating a project to use the latest template

From your project folder, run `middleman init . -T alphagov/tech-docs-template`.

When asked 'Are you creating a completely new documentation project?', be sure
to answer **no** to avoid having the default 'demo' documentation and config
being created.

If you have made any changes to the layout or any of the assets you will be
prompted to resolve any conflicts, at which point you can view a diff between
your version and the latest version.

## Tests

We have some automated JavaScript tests that use [Jasmine][jas] as a test
framework.

To run the tests on your machine:

- Run `bundle exec rake jasmine`
- Navigate to `http://localhost:8888` in a browser of your choosing
- Peruse the output of your tests

Or, on the command line, run `bundle exec rake jasmine:ci`.



[mm]: https://middlemanapp.com/
[mmt]: https://middlemanapp.com/advanced/project_templates/
[jas]: https://jasmine.github.io/

0 comments on commit 0933e0d

Please sign in to comment.