+
+A basic multipage documentation repo can have this structure:
+
+
+![](/diagrams/Basic_multipage.svg)
+
+
+You must amend the documentation repo folder structure to reflect this structure.
+
+### Create multiple .html.md.erb files
+
+Basic multipage requires multiple `.html.md.erb` files in the tech docs repo __source__ folder.
+
+Each `.html.md.erb` file relates to one separate page within the tech docs, and references the markdown files in the associated folder.
+
+Additionally, the tech doc repo must have at least one `.html.md.erb` file in the __source__ folder named `index.html.md.erb`.
+
+The .html.md.erb files must not have the same name as the folders that the .html.md.erb files use partials refer to.
+
+For example, you cannot have a support.html.md.erb file that contains the partial `<%= partial 'support/contact_us' %>`.
+
+### Amend the multiple .html.md.erb files
+
+1. Add a weight argument and value to the title of each .html.md.erb file. This builds the structure of the multipage documentation.
+
+ For example:
+
+ ```bash
+ ---
+ title: "Product Technical Documentation"
+ ---
+ ```
+
+ becomes
+
+ ```bash
+ ---
+ title: "Product Technical Documentation"
+ weight: 10
+ ---
+ ```
+
+ Higher weights mean that the content is lower down in the documentation hierarchy. An easy way to remember this is to think āheavier pages sink to the bottomā.
+
+ For example, a single `.html.md.erb` file becomes multiple `.html.md.erb` files:
+
+
+
+### Add H1 heading if required
+
+Add an H1 heading to either the `.html.md.erb` file or at the start of the first markdown file for each individual content page.
+
+If there is an H1 heading in both, you will see two H1s when the documentation site builds and renders in your internet browser.
+
+## Nested multipage
+
+You can split the content into multiple individual pages, and can have pages "nested" within one another. Two examples:
+
+- [GOV.UK PaaS technical documentation - Deploying services](https://docs.cloud.service.gov.uk/deploying_services/)
+- [GOV.UK Pay technical documentation - Switching to live](https://docs.payments.service.gov.uk/switching_to_live/#switching-to-live)
+
+### Amend the tech-docs.yml file
+
+Add this to your projectās `tech-docs.yml` file, or set it to true if it is already there:
+
+```
+# Enable multipage navigation in the sidebar
+multipage_nav: true
+```
+
+### Repo folder structure
+
+A typical single page documentation repo has this folder structure:
+
+
+![](/diagrams/Single_page.svg)
+
+
+A nested multipage documentation repo can have this structure:
+
+
+![](/diagrams/Nested_multipage.svg)
+
+
+You must amend the documentation repo folder structure to reflect this structure.
+
+### Create multiple .html.md.erb files
+
+Basic multipage requires multiple `.html.md.erb` files in the tech docs repo __source__ folder.
+
+Each `.html.md.erb` file relates to one separate page within the tech docs, and references the markdown files in the associated folder.
+
+Additionally, the tech doc repo must have at least one `.html.md.erb` file in the __source__ folder named `index.html.md.erb`.
+
+### Amend the multiple .html.md.erb files
+
+1. Add a weight argument and value to the title of each .html.md.erb file. This builds the structure of the multipage documentation.
+
+ For example:
+
+ ```bash
+ ---
+ title: "Product Technical Documentation"
+ ---
+ ```
+
+ becomes
+
+ ```bash
+ ---
+ title: "Product Technical Documentation"
+ weight: 10
+ ---
+ ```
+
+ Higher weights mean that the content is lower down in the documentation hierarchy. An easy way to remember this is to think āheavier pages sink to the bottomā.
+
+ For example, a single `.html.md.erb` file becomes multiple `.html.md.erb` files:
+
+
+
+### Add H1 heading if required
+
+Add an H1 heading to either the `.html.md.erb` file or at the start of the first markdown file for each individual content page.
+
+If there is an H1 heading in both, you will see two H1s when the documentation site builds and renders in your internet browser.
+
+### Create folder for nested content .html.md.erb files
+
+Refer to the GOV.UK PaaS technical documentation repo [nested content folder](https://github.com/alphagov/paas-tech-docs/tree/master/source/deploying_services) as an example.
+
+1. Create a folder within the __source__ folder. This is where the `.html.md.erb` files for your nested content must live.
+
+1. Create an `index.html.md.erb` file within the nested content folder. This will be the "wrapper" for the nested content. It can refer to another content file through partials or have the content in itself.
+
+ Note that each `.html.md.erb` must have a weight value that preserves the overall hierarchy both within the nested content and compared to the other non-nested content.
+
+1. Create sub-folders for each nested page under the "wrapper".
+
+1. Create an `index.html.md.erb` file within each sub-folder. Each `.html.md.erb` file can refer to another content file through partials or have the content in itself.
+
+ Note that each `.html.md.erb` file must have a weight value that preserves the overall hierarchy both within the nested content and compared to the other non-nested content.
+
+### Add H1 heading if required
+
+Add an H1 heading to either the `.html.md.erb` file or at the start of the first markdown file for each individual content page.
+
+If there is an H1 heading in both, you will see two H1s when the documentation site builds and renders in your internet browser.
diff --git a/docs/source/architecture/single_page.md b/docs/source/architecture/single_page.md
new file mode 100644
index 00000000..5c9e725d
--- /dev/null
+++ b/docs/source/architecture/single_page.md
@@ -0,0 +1,53 @@
+# Build a single page site
+
+You can create a technical documentation site that contains all of its content in a single page.
+
+This is suitable for documentation sites that have do not have a lot of content, and do not need to have topics split into individual pages.
+
+## Organise content files
+
+1. [Create](create_new_project.html#create-a-new-project) the content files for your documentation site.
+
+1. Amend [link] your content files to ready them for your documentation site.
+
+1. Save your content files inside your documentation repo in your desired hierarchy.
+
+## Build your documentation site's structure
+
+1. Go to the __source__ folder in your documentation repo.
+
+1. Select the `index.html.md.erb` file.
+
+1. Amend the `index.html.md.erb` file.
+
+ You can either [add a `<%= partial` line](single_page.html#add-partial-lines) that references each content file that makes up your overall documentation site, or add the content into the `index.html.md.erb` file directly.
+
+ The .html.md.erb files must not have the same name as the folders that the .html.md.erb files use partials refer to.
+
+ For example, you cannot have a support.html.md.erb file that contains the partial `<%= partial 'support/contact_us' %>`.
+
+### Add partial lines
+
+In this example, you have three content files:
+
+- an introduction named `index.md` in the `documentation` folder
+- a "Who is this documentation for?" section named `who-docs.md` in the `documentation/introduction` folder
+- a "Set up the API client" section named `set_up_client` in the `documentation/introduction` folder
+
+The `index.html.md.erb` file would look like this:
+
+```bash
+---
+title: "GOV.UK Technical Documentation"
+---
+
+<%= partial 'documentation/index' %>
+<%= partial 'documentation/introduction/who_docs' %>
+<%= partial 'documentation/introduction/set_up_client' %>
+```
+
+This `index.html.md.erb` will build a documentation site with the following structure:
+
+- Introducution
+- Who is this documentation for?
+- Set up the client
diff --git a/docs/source/collapsible_nav.html.md.erb b/docs/source/collapsible_nav.html.md.erb
new file mode 100644
index 00000000..4e648f1a
--- /dev/null
+++ b/docs/source/collapsible_nav.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Collapsible navigation"
+weight: 70
+---
+
+<%= partial 'functionality/collapsible_nav' %>
diff --git a/docs/configuration.md b/docs/source/configuration-options.html.md.erb
similarity index 86%
rename from docs/configuration.md
rename to docs/source/configuration-options.html.md.erb
index dd9acfa6..6f9a8cd9 100644
--- a/docs/configuration.md
+++ b/docs/source/configuration-options.html.md.erb
@@ -1,4 +1,8 @@
-# Configuration
+---
+title: "Global configuration options"
+---
+
+# Global configuration options
You can configure the site using `config/tech-docs.yml`. [See the PaaS tech docs for an example](https://github.com/alphagov/paas-tech-docs/blob/master/config/tech-docs.yml).
@@ -192,4 +196,14 @@ api_path: ./source/pets.yml
These attributes are used to specify the owner of a page. See the separate
[documentation for page expiry][expiry] for more details.
-[expiry]: https://alphagov.github.io/tech-docs-manual/#page-expiry-and-review-notices
+## `show_expiry`
+
+Decides whether or not to show a red banner when the page needs to be reviewed.
+
+If not present or set to `true`, the red banner will appear when the page needs to be reviewed. This is the default behaviour.
+
+If set to `false`, the red banner will not appear when the page needs to be reviewed.
+
+See the separate [documentation for page expiry][expiry] for more details.
+
+[expiry]: https://tdt-documentation.london.cloudapps.digital/page-expiry.html#page-expiry-and-review
diff --git a/docs/source/content.html.md.erb b/docs/source/content.html.md.erb
new file mode 100644
index 00000000..b2ff1b5a
--- /dev/null
+++ b/docs/source/content.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Content examples"
+weight: 51
+---
+
+<%= partial 'content_example/content' %>
diff --git a/docs/source/content_example/content.md b/docs/source/content_example/content.md
new file mode 100644
index 00000000..32e6ba11
--- /dev/null
+++ b/docs/source/content_example/content.md
@@ -0,0 +1,113 @@
+# Content examples
+
+This page provides examples of different content types.
+
+## Headings
+
+```bash
+# H1
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+```
+
+## Ordered list
+
+```bash
+1. list item 1
+1. list item 2
+1. list item 3
+...
+1. list item N
+```
+
+## Unordered list
+
+```bash
+- list item 1
+- list item 2
+- list item 3
+...
+- list item N
+```
+
+## Tables
+
+You can create tables using either markdown or HTML.
+
+Use markdown when there are no specific formatting requirements.
+
+Use HTML when there are specific formatting requirements, for example to ensure that text in cells do not wrap.
+
+### Create table using markdown
+
+Use markdown when there are no specific formatting requirements.
+
+This example is a left-aligned table.
+
+You should include `
+```
+
+You can change the alignment of the text:
+
+- Centre: `|:---:|`
+- Right: `|---:|`
+
+Add more columns and rows as needed.
+
+### Create table using HTML
+
+You should create tables using HTML when there are specific formatting requirements.
+
+The following code is an example of a 2 column 2 row table with no text wrapping.
+
+```bash
+
+
+
+
Header 1
+
Header 2
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin et enim quis arcu pharetra aliquet. Maecenas posuere tellus arcu, a suscipit dui posuere eu. Nunc vestibulum ligula sit amet eros euismod accumsan.
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin et enim quis arcu pharetra aliquet. Maecenas posuere tellus arcu, a suscipit dui posuere eu. Nunc vestibulum ligula sit amet eros euismod accumsan.
+
+
+
+```
+
+## Links
+
+```bash
+[LINK TEXT](LINK ADDRESS)
+```
+
+For example:
+
+```bash
+[The Google home page](http://www.google.co.uk)
+```
+
+You can write the link in HTML with a `target="blank"` element to make the link open in a new internet browser tab by default:
+
+```bash
+LINK TEXT
+```
+
+## Images
+
+`!``[]``(LOCATION_OF_IMAGE)`
diff --git a/docs/source/create_new_project.html.md.erb b/docs/source/create_new_project.html.md.erb
new file mode 100644
index 00000000..8263329a
--- /dev/null
+++ b/docs/source/create_new_project.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Create a new project"
+weight: 30
+---
+
+<%= partial 'manage_project/create_new_project' %>
diff --git a/docs/source/diagrams/Basic multipage.svg b/docs/source/diagrams/Basic multipage.svg
new file mode 100644
index 00000000..078ddfc2
--- /dev/null
+++ b/docs/source/diagrams/Basic multipage.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/source/diagrams/Basic_multipage.svg b/docs/source/diagrams/Basic_multipage.svg
new file mode 100644
index 00000000..078ddfc2
--- /dev/null
+++ b/docs/source/diagrams/Basic_multipage.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/source/diagrams/Nested multipage.svg b/docs/source/diagrams/Nested multipage.svg
new file mode 100644
index 00000000..f6b366dc
--- /dev/null
+++ b/docs/source/diagrams/Nested multipage.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/source/diagrams/Nested_multipage.svg b/docs/source/diagrams/Nested_multipage.svg
new file mode 100644
index 00000000..f6b366dc
--- /dev/null
+++ b/docs/source/diagrams/Nested_multipage.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/source/diagrams/Single_page.svg b/docs/source/diagrams/Single_page.svg
new file mode 100644
index 00000000..bb76caf0
--- /dev/null
+++ b/docs/source/diagrams/Single_page.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/source/diagrams/index.md b/docs/source/diagrams/index.md
new file mode 100644
index 00000000..3c006c64
--- /dev/null
+++ b/docs/source/diagrams/index.md
@@ -0,0 +1 @@
+This folder is for diagrams.
diff --git a/docs/frontmatter.md b/docs/source/frontmatter.html.md.erb
similarity index 90%
rename from docs/frontmatter.md
rename to docs/source/frontmatter.html.md.erb
index c5bf2c51..2b708c07 100644
--- a/docs/frontmatter.md
+++ b/docs/source/frontmatter.html.md.erb
@@ -1,3 +1,9 @@
+---
+title: "Frontmatter"
+---
+
+# Frontmatter
+
# Available frontmatter
"Frontmatter" allows page-specific variables to be included at the top of a template using YAML. For a general introduction on frontmatter, see the [Middleman frontmatter docs][mm].
@@ -7,7 +13,7 @@
These attributes determine the date when the page needs to be reviewed next.
See the separate [documentation for page expiry][expiry] for more details.
-[expiry]: https://alphagov.github.io/tech-docs-manual/#page-expiry-and-review-notices
+[expiry]: https://tdt-documentation.london.cloudapps.digital/page-expiry.html#page-expiry-and-review
Example:
@@ -45,7 +51,7 @@ layout: layout
Will generate a page with the headings from the content in the sidebar.
-![](layout-layout.png)
+![](images/layout-layout.png)
### `core` layout
@@ -63,7 +69,7 @@ layout: core
This page has a configurable sidebar that is independent of the content.
```
-![](core-layout.png)
+![](images/core-layout.png)
If you do not specify a sidebar, you will get a simple one-column layout without one.
@@ -75,7 +81,7 @@ layout: core
This page does not have a sidebar.
```
-![](core-layout-without-sidebar.png)
+![](images/core-layout-without-sidebar.png)
## `old_paths`
diff --git a/docs/source/functionality/api_reference.md b/docs/source/functionality/api_reference.md
new file mode 100644
index 00000000..6bc29022
--- /dev/null
+++ b/docs/source/functionality/api_reference.md
@@ -0,0 +1,37 @@
+# Enable API reference
+
+This feature extracts endpoint information from an Open API v3 yaml file that describes an API.
+
+## Amend the tech-docs.yml file
+
+Add the following to your tech-docs.yml file:
+
+```
+api_path: path/to/file.yaml
+```
+
+This can be a relative path to a file in your tech docs repo folder, for example:
+
+```
+api_path: ./source/pets.yaml
+```
+
+This can also be a URL to a file hosted elsewhere, for example:
+
+```
+api_path: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
+```
+
+## Amend the content file
+
+Add the following line to the content file that you want to output the API information to:
+
+```
+api>
+```
+
+You can specify individual endpoints to be outputted rather than all API information, for example::
+
+```
+api> /pets
+```
diff --git a/docs/source/functionality/collapsible_nav.md b/docs/source/functionality/collapsible_nav.md
new file mode 100644
index 00000000..331ec81c
--- /dev/null
+++ b/docs/source/functionality/collapsible_nav.md
@@ -0,0 +1,12 @@
+# Enable collapsible navigation
+
+This enables the left hand navigation to expand and collapse.
+
+## Amend the tech-docs.yml file
+
+Add the following to your project's `tech-docs.yml` file, or set it to true if it is already there:
+
+```
+# Enable collapsible navigation in the sidebar
+collapsible_nav: true
+```
diff --git a/docs/source/functionality/search.md b/docs/source/functionality/search.md
new file mode 100644
index 00000000..ec45abc2
--- /dev/null
+++ b/docs/source/functionality/search.md
@@ -0,0 +1,13 @@
+# Enable search
+
+The search function is especially useful for multipage documentation.
+
+## Amend the tech-docs.yml file
+
+Add the following to your projectās `tech-docs.yml` file, or set it to true if it is already there:
+
+```
+# Enable search
+enable_search: true
+```
+
diff --git a/docs/source/functionality/update_gem.md b/docs/source/functionality/update_gem.md
new file mode 100644
index 00000000..46739ca7
--- /dev/null
+++ b/docs/source/functionality/update_gem.md
@@ -0,0 +1,49 @@
+# Update docs to use latest tech-docs-gem
+
+## Clone the remote documentation repo
+
+1. Open your internet browser and go to your remote documentation repo on GitHub.
+
+1. Select the __Clone or download__ button.
+
+1. Select either __Use HTTPS__ or __Use SSH__.
+
+1. Select the copy button.
+
+1. In the command line, clone the remote repo to a local directory:
+
+ ```
+ git clone [repo address]
+ ```
+
+## Update the ruby gems in the documentation repo
+
+1. Update all ruby gems in the cloned local documentation repo:
+
+ ```
+ bundle update
+ ```
+
+ This updates all the ruby gems that your repo uses, including the `tech-docs-gem`.
+
+ You should get the message `Bundle updated!` once the update is finished.
+
+1. Add all changes to the next commit:
+
+ ```
+ git add .
+ ```
+
+1. Commit the changes:
+
+ ```
+ git commit -m "[commit message]"
+ ```
+ where `COMMIT_MESSAGE` is the description of the commit.
+
+1. Push the new branch to the remote documentation repo on GitHub:
+
+ ```
+ git push -u origin [BRANCH NAME]
+ ```
+1. Review, approve and merge the changes in line with your service team processes.
diff --git a/docs/source/functionality/warning.md b/docs/source/functionality/warning.md
new file mode 100644
index 00000000..23699a1e
--- /dev/null
+++ b/docs/source/functionality/warning.md
@@ -0,0 +1,25 @@
+# Insert a warning
+
+Use the warning text component when you need to warn users about something important, such as legal consequences of an action, or lack of action, that they might take.
+
+This warning text format is taken from the [GOV.UK Design System warning text](https://design-system.service.gov.uk/components/warning-text/).
+
+Insert the following HTML code into your content file:
+
+```bash
+
+
+
+!
+
+Warning
+
INSERT-WARNING-TEXT-HERE
+
+```
+
+If you have multiple warnings in one content file, you only need to insert the `` text once.
+
+You can then insert the `
...
` once for each separate warning.
+
diff --git a/docs/source/getting_started/install_macs.md b/docs/source/getting_started/install_macs.md
new file mode 100644
index 00000000..a5dcfc02
--- /dev/null
+++ b/docs/source/getting_started/install_macs.md
@@ -0,0 +1,55 @@
+# Prerequisites for Macs
+
+You must have the following set up on your mac laptop:
+
+- administrator rights on your laptop
+- [Xcode](https://developer.apple.com/xcode/) command line interface tools
+- [Ruby](https://www.ruby-lang.org/en/)
+- [Middleman](https://middlemanapp.com/) static site generator
+
+## Administrator rights on your laptop
+
+Email [sd-community@digital.cabinet-office.gov.uk](mailto:sd-community@digital.cabinet-office.gov.uk) to request administrator rights on your laptop.
+
+You must be a Government Digital Service employee to do this.
+
+## Install Xcode command line interface tools
+
+These instructions assume that you are the Managed Software Centre on your Mac.
+
+1. Go to the Managed Software Centre on your Mac.
+1. Select Updates.
+1. Install all required updates.
+1. Search for xcode in the search field in Updates.
+1. Install Xcode x.x.x or update if necessary.
+
+OR
+
+1. Go to [Apple Developer Downloads](https://developer.apple.com/download/more).
+1. Search for "xcode".
+1. Select the appropriate __Command Line Tools (macOS x.x) for Xcode x.x__ and download the file.
+1. Install the file.
+
+## Install Ruby
+
+[Ruby](https://www.ruby-lang.org/en/) is installed globally. This means that you can run the install command from any location on your local machine rather than from within a specific folder.
+
+You can install Ruby in multiple ways, for example using [Ruby Version Manager](https://rvm.io/) (RVM) or [rbenv](https://github.com/rbenv/rbenv). These instructions assume you are using RVM.
+
+1. Run the following in the command line interface to install the ruby version manager:
+
+ ```
+ `\curl -sSL https://get.rvm.io | bash -s stable --ruby`
+ ```
+
+1. Run `rvm install ruby-x.x.x` to install the latest version of [Ruby](https://www.ruby-lang.org/en/). The current x.x.x is `2.6.1`.
+
+## Install Middleman
+
+[Middleman](https://middlemanapp.com/) is installed globally. This means that you can run the install command from any location on your local machine rather than from within a specific folder.
+
+Run the following in the command line interface to install Middleman:
+
+```
+gem install middleman
+```
diff --git a/docs/core-layout-without-sidebar.png b/docs/source/images/core-layout-without-sidebar.png
similarity index 100%
rename from docs/core-layout-without-sidebar.png
rename to docs/source/images/core-layout-without-sidebar.png
diff --git a/docs/core-layout.png b/docs/source/images/core-layout.png
similarity index 100%
rename from docs/core-layout.png
rename to docs/source/images/core-layout.png
diff --git a/docs/expired-page.png b/docs/source/images/expired-page.png
similarity index 100%
rename from docs/expired-page.png
rename to docs/source/images/expired-page.png
diff --git a/docs/source/images/last-reviewed-only.png b/docs/source/images/last-reviewed-only.png
new file mode 100644
index 00000000..a31a0f5a
Binary files /dev/null and b/docs/source/images/last-reviewed-only.png differ
diff --git a/docs/source/images/last-reviewed-only.svg b/docs/source/images/last-reviewed-only.svg
new file mode 100644
index 00000000..e950b27a
--- /dev/null
+++ b/docs/source/images/last-reviewed-only.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/layout-layout.png b/docs/source/images/layout-layout.png
similarity index 100%
rename from docs/layout-layout.png
rename to docs/source/images/layout-layout.png
diff --git a/docs/not-expired-page.png b/docs/source/images/not-expired-page.png
similarity index 100%
rename from docs/not-expired-page.png
rename to docs/source/images/not-expired-page.png
diff --git a/docs/source/index.html.md.erb b/docs/source/index.html.md.erb
new file mode 100644
index 00000000..96817277
--- /dev/null
+++ b/docs/source/index.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Tech Docs Template"
+weight: 10
+---
+
+<%= partial 'introduction/introduction' %>
diff --git a/docs/source/install_macs.html.md.erb b/docs/source/install_macs.html.md.erb
new file mode 100644
index 00000000..fe8d6b4c
--- /dev/null
+++ b/docs/source/install_macs.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Prerequisites for Macs"
+weight: 20
+---
+
+<%= partial 'getting_started/install_macs' %>
diff --git a/docs/source/introduction/introduction.md b/docs/source/introduction/introduction.md
new file mode 100644
index 00000000..247541b7
--- /dev/null
+++ b/docs/source/introduction/introduction.md
@@ -0,0 +1,21 @@
+# Tech Docs Template
+
+## What you can use this tool for
+
+This tool is a template for technical and developer documentation.
+
+It uses the [Middleman static site generator](https://middlemanapp.com/) to convert markdown files into HTML-based documentation that looks consistent with the GOV.UK and GDS style and format.
+
+It is suitable for multiple styles of documentation, including API documentation.
+
+## Why you should use this tool
+
+It promotes consistency on technical documentation which should reassure end users.
+
+It helps technical writers manage their technical content using the [ādocs as codeā](https://gdstechnology.blog.gov.uk/2017/08/25/why-we-use-a-docs-as-code-approach-for-technical-documentation/) approach.
+
+This documentation is currently under construction.
+
+## Who should use this tool
+
+The Tech Docs Template is intended for internal use by the GDS and government community.
diff --git a/docs/source/javascripts/application.js b/docs/source/javascripts/application.js
new file mode 100644
index 00000000..8a5d80b8
--- /dev/null
+++ b/docs/source/javascripts/application.js
@@ -0,0 +1 @@
+//= require govuk_tech_docs
diff --git a/docs/source/manage_project/create_new_project.md b/docs/source/manage_project/create_new_project.md
new file mode 100644
index 00000000..687b90e0
--- /dev/null
+++ b/docs/source/manage_project/create_new_project.md
@@ -0,0 +1,22 @@
+# Create a new project
+
+1. Open the command line interface.
+
+1. Navigate to your documents folder.
+
+1. Run the following in the command line:
+
+ ```
+ middleman init PROJECT_NAME -T alphagov/tech-docs-template
+ ```
+ where `PROJECT_NAME` is the name of your project.
+
+1. Answer the installation questions.
+
+1. Project creation is complete when you see `Bundle complete!`.
+
+## View your new project
+
+Navigate to the created documentation repo folder.
+
+The folder will have multiple pre-populated files. You will only need to amend the `/source` folder and the `config/tech-docs.yml` file.
diff --git a/docs/source/middleman.html.md.erb b/docs/source/middleman.html.md.erb
new file mode 100644
index 00000000..ea54cc63
--- /dev/null
+++ b/docs/source/middleman.html.md.erb
@@ -0,0 +1,16 @@
+---
+title: "Middleman options"
+weight: 87
+---
+
+# Middleman options
+
+The Tech Docs Template is built with
+[Middleman](https://middlemanapp.com/), so it offers all the same
+functionality. Much of this is not specific to the tool itself.
+
+For example, you can read Middleman's own documentation about:
+
+* how to set up [redirects](https://middlemanapp.com/basics/redirects/)
+* the development cycle, and [how to run a local version of your site](https://middlemanapp.com/basics/development-cycle/)
+* how to [build your site](https://middlemanapp.com/basics/build-and-deploy/)
diff --git a/docs/source/multipage.html.md.erb b/docs/source/multipage.html.md.erb
new file mode 100644
index 00000000..07e18442
--- /dev/null
+++ b/docs/source/multipage.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Multipage"
+weight: 50
+---
+
+<%= partial 'architecture/multipage' %>
diff --git a/docs/page-expiry.md b/docs/source/page-expiry.html.md.erb
similarity index 57%
rename from docs/page-expiry.md
rename to docs/source/page-expiry.html.md.erb
index 7ca857b9..eb4c660a 100644
--- a/docs/page-expiry.md
+++ b/docs/source/page-expiry.html.md.erb
@@ -1,21 +1,41 @@
-# Page Expiry and Review Notices
+---
+title: "Page expiry and review notices"
+---
+
+# Page expiry and review notices
It's possible to include frontmatter configuration for a page to set an
-expiration date for a piece of content.
+expiration date for a piece of content. The expiration date is calculated using the `last_reviewed_on` and `review_in` frontmatter configuration parameters.
+
+The `show_expiry` parameter in the global configuration file decides if the banners at the bottom of the page say that the page is expired or not.
+
+For `show_expiry: true`, the banner at the bottom turns red if it's past the expiration date.
If the page doesn't need to be reviewed, we show a blue box with the
last-reviewed date, when it needs review again, and the owner.
-![](not-expired-page.png)
+![](images/not-expired-page.png)
If the page needs to be reviewed, we show a red box saying the page might not
be accurate.
-![](expired-page.png)
+![](images/expired-page.png)
+
+Setting `show_expiry: false` generates a blue banner with the last reviewed date. This banner stays the same whether the page needs to be reviewed or not. The banner does not mention when the page needs to be reviewed next or who the owner is.
+
+![](images/last-reviewed-only.png)
This feature relies on JavaScript being enabled on the user's browser to
display the relevant notices.
+If you want to disable the banners, but keep the review dates in the frontmatter, add the following to `source/javascripts/application.js`
+
+```js
+// Disable page expiry banner
+window.GOVUK.Modules.PageExpiry = null;
+```
+
+For example if you do not want any page expiry banner at the bottom of the page, but want to have the review dates in the frontmatter for Daniel the Manual Spaniel to pick up.
## Frontmatter configuration
diff --git a/docs/source/preview/temp_version.md b/docs/source/preview/temp_version.md
new file mode 100644
index 00000000..6d7f42b1
--- /dev/null
+++ b/docs/source/preview/temp_version.md
@@ -0,0 +1,80 @@
+# Push a temporary documentation site to the GOV.UK PaaS
+
+You can preview your documentation on a temporary documentation website on the GOV.UK PaaS.
+
+## Download the Autopilot plugin
+
+Autopilot is a Cloud Foundry plugin for zero-downtime app deployment.
+
+1. Go to `https://github.com/contraband/autopilot/releases` and download the latest `autopilot-darwin` file.
+
+1. Open your command line interface and go to the folder containing the `autopilot-darwin` file.
+
+1. Run `chmod +x autopilot-darwin` in the command line to make the `autopilot-darwin` file executable.
+
+1. Run `cf install-plugin autopilot-darwin` to install the plugin.
+
+## Sign in to the GOV.UK PaaS
+
+1. Run the following in the command line:
+
+ ```
+ cf login -a api.cloud.service.gov.uk -u @digital.cabinet-office.gov.uk
+ ```
+
+1. [Target](https://docs.cloud.service.gov.uk/deploying_apps.html#set-a-target) the org and space by running:
+
+ ```
+ cf target -o ORG_ NAME -s SPACE_NAME
+ ```
+
+ where ORG_NAME is the name of the org, and SPACE_NAME is the name of the space.
+
+1. Run `cf apps` to check what apps are running in the targeted space.
+
+## Push the documentation site to the GOV.UK PaaS
+
+1. Create the following manifest file in your tech docs repo:
+
+ ```
+ applications:
+ - name: NAME
+ memory: 64M
+ path: ./build
+ buildpack: staticfile_buildpack
+ instances: 2
+ ```
+
+1. In your command line, go to the folder containing the manifest file.
+
+1. Run the following in the command line to push the site to a temporary site:
+
+ ```
+ cf zero-downtime-push NEW_APP_NAME_TO_BE_DEPLOYED -f MANIFEST_PATH_AND_NAME
+ ```
+
+ You can run this command from a folder that does not contain the manifest file by adding `-p YOUR_FILE_PATH`, for example:
+
+ ```
+ cf zero-downtime-push NEW_APP_NAME_TO_BE_DEPLOYED -f MANIFEST_PATH_AND_NAME -p YOUR_FILE_PATH
+ ```
+ >Include example for cf push if not using autopilot?
+
+1. Run `cf apps` to check your new app appears in the targeted org and space.
+
+1. Check your app has deployed by going to ` NEW_APP_NAME_TO_BE_DEPLOYED.cloudapps.digital`.
+
+# Preview from your local machine
+
+You can preview your documentation from your local machine.
+
+Run the following from the documentation repo folder on your local machine:
+
+```
+bundle exec middleman server
+```
+
+Go to your internet browser and navigate to `http://localhost:4567/` to preview your documentation.
+
+You can change your content files and see the documentation update immediately.
+
diff --git a/docs/source/publish/push_repo.md b/docs/source/publish/push_repo.md
new file mode 100644
index 00000000..6449d246
--- /dev/null
+++ b/docs/source/publish/push_repo.md
@@ -0,0 +1,129 @@
+# Publish your documentation
+
+To publish your documentation, you must:
+
+- push your documentation to the remote GitHub repo
+- deploy your site
+
+## Push documentation to GitHub
+
+These instructions assume that you have documentation changes ready to push to GitHub.
+
+To push your documentation changes to GitHub for the first time, you must:
+
+- create local and remote GitHub repos
+- commit all changes in the local repo
+- link the local repo to the remote repo
+- push the staged commit to the remote repo
+
+### Create local and remote GitHub repos
+
+1. [Create a remote empty repo](https://help.github.com/articles/create-a-repo/) in your organisation on GitHub.
+
+1. [Create a new local documentation repo](/create_new_project.html#create-a-new-project) if required.
+
+### Commit all changes in the local repo
+
+1. Go to the local repo directory in the command line.
+
+1. Make the created local repo into a Git repo:
+
+ ```
+ git init
+ ```
+
+1. If applicable, add all files in the local repo and stage them for commit:
+
+ ```
+ git add .
+ ```
+
+1. Commit the staged files:
+
+ ```
+ git commit -m "COMMIT-MESSAGE"`
+ ```
+
+ where `COMMIT-MESSAGE` is the message describing the commit.
+
+### Link the local repo to the remote repo
+
+1. Go to the remote repo in GitHub.
+
+1. Select the __Clone or download__ button.
+
+1. Select either __Use HTTPS__ or __Use SSH__.
+
+1. Select the copy button.
+
+1. In the command line, link the local repo to the remote repo:
+
+ ```
+ git remote add origin REMOTE-REPO-URL
+ ```
+
+1. Verify the remote repo:
+
+ ```
+ git remote -v
+ ```
+
+### Push the staged commit to the remote repo
+
+Push the changes in your local repo to the remote repo:
+
+```
+git push -u origin master
+```
+
+You have now created a remote documentation repo on GitHub.
+
+For more information, refer to [Adding an existing project to GitHub](https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/).
+
+## Deploy your site
+
+The Tech Docs Template is built on Middleman, which is a static
+site generator. You can therefore deploy your site anywhere that supports
+static sites.
+
+### Use the GOV.UK PaaS
+
+We recommend that government services use the [GOV.UK
+PaaS](https://www.cloud.service.gov.uk/) to deploy documentation sites built
+with the Tech Docs Template. This is also free of charge for
+government services.
+
+### GitHub Pages
+
+With some modification, you can also deploy your site with [GitHub
+Pages](https://pages.github.com/), but we do not support this. To do this, you
+could for example use the [`middleman-gh-pages`]
+tool](https://github.com/edgecase/middleman-gh-pages), which we do not
+support. We also cannot guarantee that all features of the tool will work if
+you deploy your site with GitHub Pages.
+
+### Add basic authentication
+
+There are many ways to add basic authentication to your documentation site.
+
+The following instructions apply if you want to deploy your documentation site on the GOV.UK PaaS or another platform using the [Cloud Foundry open source cloud application platform](https://www.cloudfoundry.org/).
+
+This method relies on adding a `Staticfile.auth` file to the `build` folder because building the documentation doesn't automatically add the `Staticfile.auth` file. If you added `Staticfile.auth` once and run the build command again, the file will disappear. You need to add `Staticfile.auth` again to enable basic authentication for the new build.
+
+1. In the command line, navigate to your local documentation repo.
+
+1. If required, run `bundle exec middleman build` to create a `build` folder.
+
+1. Create a new `Staticfile.auth` file in the `build` folder.
+
+1. Go to the [Htpasswd Generator](http://www.htaccesstools.com/htpasswd-generator).
+
+1. Complete the __Username__ and __Password__ fields, and select __Create .htpasswd file__.
+
+1. Copy the generated username and password hash into the `Staticfile.auth` file and save.
+
+1. Deploy your documentation site in line with your normal process.
+
+## Continuous integration
+
+The GOV.UK PaaS documentation explains how to set up continuous integration (CI) with [Travis and Jenkins](https://docs.cloud.service.gov.uk/using_ci.html#using-the-travis-ci-tool). We recommend this method for documentation sites built using the Tech Docs Template.
diff --git a/docs/source/publish_docs.html.md.erb b/docs/source/publish_docs.html.md.erb
new file mode 100644
index 00000000..19f907a5
--- /dev/null
+++ b/docs/source/publish_docs.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Publish your documentation"
+weight: 85
+---
+
+<%= partial 'publish/push_repo' %>
diff --git a/docs/source/review/review.md b/docs/source/review/review.md
new file mode 100644
index 00000000..e21622ab
--- /dev/null
+++ b/docs/source/review/review.md
@@ -0,0 +1,13 @@
+# Review your documentation
+
+## Governance
+
+The [technical documentation change governance framework](https://docs.google.com/document/d/1bP07wFS2zhUPRzOVLl36VP9V8RrfF_VdAqC28WjJE0Y) (requires permission to access) is a set of guidelines for technical writers to follow when making changes to technical documentation.
+
+You should follow these guidelines when changing technical documentation. It includes advice on how documentation changes should be reviewed by the documentation subject matter experts.
+
+## 2i review
+
+The 2i process is a peer review and critique of technical documentation to ensure that all documentation meets the required standards.
+
+Refer to the [GDS technical writing 2i training](https://drive.google.com/drive/u/0/folders/1V4TT2GGFw-JS3gVhMLUo6nw6BXxmb7jt) (requires permission to access) to ensure that your documentation meets all required standards.
diff --git a/docs/source/search.html.md.erb b/docs/source/search.html.md.erb
new file mode 100644
index 00000000..e0cd6ec3
--- /dev/null
+++ b/docs/source/search.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Search"
+weight: 60
+---
+
+<%= partial 'functionality/search' %>
diff --git a/docs/source/single_page.html.md.erb b/docs/source/single_page.html.md.erb
new file mode 100644
index 00000000..d28a68fa
--- /dev/null
+++ b/docs/source/single_page.html.md.erb
@@ -0,0 +1,6 @@
+---
+title: "Single Page"
+weight: 40
+---
+
+<%= partial 'architecture/single_page' %>
diff --git a/docs/source/stylesheets/print.css.scss b/docs/source/stylesheets/print.css.scss
new file mode 100644
index 00000000..82b181c0
--- /dev/null
+++ b/docs/source/stylesheets/print.css.scss
@@ -0,0 +1,3 @@
+$is-print: true;
+
+@import "govuk_tech_docs";
diff --git a/docs/source/stylesheets/screen-old-ie.css.scss b/docs/source/stylesheets/screen-old-ie.css.scss
new file mode 100644
index 00000000..da90cca5
--- /dev/null
+++ b/docs/source/stylesheets/screen-old-ie.css.scss
@@ -0,0 +1,4 @@
+$is-ie: true;
+$ie-version: 8;
+
+@import "govuk_tech_docs";
diff --git a/docs/source/stylesheets/screen.css.scss b/docs/source/stylesheets/screen.css.scss
new file mode 100644
index 00000000..7087e4d1
--- /dev/null
+++ b/docs/source/stylesheets/screen.css.scss
@@ -0,0 +1,35 @@
+@import "govuk_tech_docs";
+
+.visually-hidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+
+.notice {
+ background-color: $grey-4;
+ border-bottom: 1px solid $border-colour;
+ border-top: 1px solid $border-colour;
+ padding: 0 16px;
+ margin-top: 24px;
+
+ .container {
+ margin-bottom: 0;
+ }
+
+ p {
+ @include core-16;
+
+ margin: 0;
+ padding: ($gutter / 2) 0;
+ }
+}
+
+.technical-documentation h1:first-of-type {
+ margin-top: 0 !important;
+}
\ No newline at end of file
diff --git a/docs/source/support/support.md b/docs/source/support/support.md
new file mode 100644
index 00000000..9f250baa
--- /dev/null
+++ b/docs/source/support/support.md
@@ -0,0 +1,37 @@
+# Support
+
+## Report issues
+
+Report any problems or issues by:
+
+- contacting the GDS technical writing community on [email](mailto:technical-writers@digital.cabinet-office.gov.uk) or [slack](https://gds.slack.com/messages/CAD579Y1X/)
+- posting in the [tech docs format](https://gds.slack.com/messages/CADK8N58B/) slack channel
+- opening an issue on the [tech docs template repo](https://github.com/alphagov/tech-docs-template/issues)
+
+## Github repos
+
+The repos are:
+
+- the [tech-docs-template](https://github.com/alphagov/tech-docs-template)
+- the [tech-docs-gem](https://github.com/alphagov/tech-docs-gem)
+
+## Current documentation
+
+