Skip to main content
Sitemap

Options

Customise the appearance and behaviour of your website.

You can add options to the second parameter of the addPlugin function in your Eleventy config file.

For example, to add a service name to the right of the NHS.UK text in the header, you would add the following:

import { nhsukEleventyPlugin } from '@x-govuk/nhsuk-eleventy-plugin'

export default function(eleventyConfig) {
  eleventyConfig.addPlugin(nhsukEleventyPlugin, {
    service: {
      name: 'Example service'
    },
  })
}
Plugin options
Name Type Description
footer object

Options for footer component.

header object

Options for header component.

headingPermalinks boolean

Add links to headings, making it easier to share sections of a page (default is false).

homeKey string

First item in pagination and key to use when referring to the home page for eleventyNavigation.parent (default is ‘Home’).

icons object Override NHS.UK icons.
icons.mask string|boolean Override NHS.UK SVG mask icon. Use `false` to not include a mask icon.
icons.shortcut string|boolean Override NHS.UK favicon. Use `false` to not include a favicon.
icons.touch string|boolean

Override NHS.UK touch icon. Use false to not include a touch icon.

opengraphImageUrl string URL for default Open Graph share image.
showBreadcrumbs boolean

Show breadcrumb navigation (default is true with nested pages).

stylesheets Array Stylesheets to load instead of default application styles.
templates object

Configuration for page templates.

templates.error404 object

Configuration for the 404 page not found template.

templates.feed object

Configuration for the RSS feed template.

templates.searchIndex object

Configuration for the search index template.

templates.sitemap object

Configuration for the sitemap template.

templates.tag object

Configuration for the tag templates.

titleSuffix string or boolean

Value to show at the end of the document title (default is NHS.UK).

url string The URL of your website. Optional, but required to have valid canonical URLs in Open Graph meta data.