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 Eleventy config file.

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

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

export default function(eleventyConfig) {
  eleventyConfig.addPlugin(govukEleventyPlugin, {
    header: {
      productName: 'Apply for a juggling licence',
    }
  })
}
Plugin options
Name Type Description
icons object Override GOV.UK icons.
icons.mask string|boolean Override GOV.UK SVG mask icon. Use `false` to not include a mask icon.
icons.shortcut string|boolean Override GOV.UK favicon. Use `false` to not include a favicon.
icons.touch string|boolean

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

opengraphImageUrl string URL for default Open Graph share image.
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’).

parentSite object Website to show as first item in breadcrumbs.
parentSite.url string URL for parent site.
parentSite.name string Name of parent site.
rebrand boolean

Use GOV.UK rebrand (default is false, this will change to true in a subsequent release after 25 June 2025).

showBreadcrumbs boolean

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

stylesheets Array Additional stylesheets to load after application styles.
themeColor string

Browser theme colour. Must be a hex value, i.e. #0b0c0c

titleSuffix string or boolean

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

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

See header options.

serviceNavigation object

See service navigation options.

footer object

See footer options.

Header options

In addition to the options available for the header component, the following options can be set for header:

Name Type Description
homepageUrl string

URL organisation name is linked to (default is '/').

logotype object Logo that appears in the header. If no value is provided, the GOV.UK logo is shown.
logotype.text string

Text to show instead of the GOV.UK logo. This text will appear bold. If html is set, this is not required. If html is provided, the text option will be ignored.

logotype.html string

If text is set, this is not required. If html is provided, the text option will be ignored.

productName string

Product name that appears after the organisation name (default is false).

search object

See search options.

Service navigation options

In addition to the options available for the service navigation component, the following options can be set for serviceNavigation:

Name Type Description
search object

Injects search field into slots.end. See search options.

Search options

You can show a search field in your site header, or within the service navigation (if enabled).

Follow guidance in the GOV.UK Design System about adding other header and navigation elements to decide which is the best location to use.

Name Type Description
label string Text to show in the search field (default is ‘Search site’).
indexPath string Path to search index file.
sitemapPath string Path to sitemap page, shown as a fallback if the search field cannot be displayed.

In addition to the options available for the footer component, the following options can be set for footer:

Name Type Description
contentLicence object

Licence description. If no value is provided, the OGL logo is shown alongside the words All content is available under the Open Government Licence v3.0, except where otherwise stated. Set to false to remove completely.

contentLicence.text string

If html is set, this is not required. If html is provided, the text option will be ignored.

contentLicence.html string

If text is set, this is not required. If html is provided, the text option will be ignored.

copyright object

Copyright statement. If no value is provided, © Crown copyright is displayed below an image of the Royal Coat of Arms. Set to false to remove completely.

copyright.text string

If html is set, this is not required. If html is provided, the text option will be ignored.

copyright.html string

If text is set, this is not required. If html is provided, the text option will be ignored.

logo boolean

Show logo in rebranded footer (default is true).