Tech docs template Beta
Table of contents

Configuration options

You can configure the site using config/tech-docs.yml. See the PaaS tech docs for an example.

These are all the available options:

ga_tracking_id

Tracking ID from Google Analytics

ga_tracking_id: UA-XXXX-Y

github_repo

Your repository. Required if show_contribution_banner is true.

github_repo: alphagov/example-repo

github_branch

Your github branch name. Useful if your default branch is not named master.

github_branch: source

google_site_verification

Adds a Google Site Verification code to the meta tags.

google_site_verification: TvDTuyvdstyusadrCSDrctyd

Enables search functionality. This indexes pages only and is not recommended for single-page sites.

enable_search: true

Right hand side navigation.

Example:

header_links:
  Documentation: /

host

Host to use for canonical URL generation (without trailing slash).

Example:

host: https://docs.cloud.service.gov.uk

collapsible_nav

Enable collapsible navigation in the sidebar. Defaults to false;

collapsible_nav: true

multipage_nav

Enable multipage navigation in the sidebar. Defaults to false;

multipage_nav: true

max_toc_heading_level

Table of contents depth – how many levels to include in the table of contents. If your ToC is too long, reduce this number and we’ll only show higher-level headings.

max_toc_heading_level: 6

phase

phase: "Beta"

prevent_indexing

Prevent robots from indexing (e.g. whilst in development)

prevent_indexing: false

redirects

A list of redirects, from old to new location. Use this to set up external redirects or if setting old_paths in the frontmatter doesn’t work.

redirects:
  /old-page.html: https://example.org/something-else.html
  /another/old-page.html: /another/new-page.html

service_name

The service name in the header.

Example:

service_name: "Platform as a Service"

full_service_name

The full service name (maybe with GOV.UK)

Example:

full_service_name: "GOV.UK Pay"

What the service name in the header links to.

default: ’/’

service_link: "/"

show_contribution_banner

Show a block at the bottom of the page that links to the page source, so readers can easily contribute back to the documentation. If turned on github_repo is required.

Off by default.

show_contribution_banner: true
github_repo: alphagov/example-repo

Whether to show the GOV.UK crown logo.

default: true

show_govuk_logo: true

api_path

Define a path to an Open API V3 spec file. This can be a relative file path or a URI to a raw file.

api_path: ./source/pets.yml

owner_slack_workspace and default_owner_slack

These attributes are used to specify the owner of a page. See the separate documentation for page expiry for more details.