The reference.html page is built using the
openapi.yaml file. Changes to content on this page
should be made by opening a pull request against the
Content Store application.
Other HTML pages are in the /source directory of this repository
and are authored using Markdown. You can suggest edits to these pages by making
changes on a branch in this project and then opening a pull request.
Metadata
Markdown files may have frontmatter (metadata) added in a standard format
at the top of the file.
Mandatory and optional frontmatter fields are specified
from the template. In our documentation, we use the following
as a minimum:
title
description
weight
In addition, the following frontmatter/metadata about the content itself has been
added to each file:
type
audience
product
These fields and their purpose are described in the analysis and planning
document, and as a minimum act as a reminder for anyone making future updates to
the file.
The content metadata may also be useful for future improvements to search (faceted
search), navigation, or page templates and layouts.
Linting markdown
After updating content locally, you can run a linter on the Markdown files (with
both the .md and .md.erb file extensions):
make lint-md
This checks your Markdown against standards and best practices, and flags any
discrepancies.
Running documentation locally
To run the documentation locally you should have this repository checked out
as well as the Content Store.
Installing dependencies
Setting up the documentation requires Ruby. Run the following to install the
necessary dependencies:
make ruby-requirements
Linting the documentation requires Node. Run the following to install the node
package and dependencies:
make node-requirements
Preview changes
Whilst writing documentation you can run a middleman server to preview how the
published docs will look in the browser. When you save a change, the preview in
the browser will automatically refresh the HTML pages. However, for changes to
the openapi.yaml file, you will need to restart the preview.
This preview is only available on your own computer. Others won’t be able to
access it if they are given the link.
Run the following command to start the middleman server: