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
Create the content files for your documentation site.
Amend [link] your content files to ready them for your documentation site.
Save your content files inside your documentation repo in your desired hierarchy.
Build your documentation site’s structure
Go to the source folder in your documentation repo.
You can either add a
<%= partialline that references each content file that makes up your overall documentation site, or add the content into the
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
- a “Who is this documentation for?” section named
- a “Set up the API client” section named
index.html.md.erb file would look like this:
--- title: "GOV.UK Technical Documentation" ---
<%= partial 'documentation/index' %> <%= partial 'documentation/introduction/who_docs' %> <%= partial 'documentation/introduction/set_up_client' %>
index.html.md.erb will build a documentation site with the following structure:
- Who is this documentation for?
- Set up the client