---
title: 'Site settings'
description: 'The settings argument to baseline(): site identity, languages, and head extras.'
slug: 'site-settings'
type: 'article'
date: 2026-04-28T00:00:00.000Z
lang: 'en'
url: 'https://www.eleventy-baseline.dev/docs/core-reference/site-settings/'
---

`settings` is the first argument to `baseline()`. It carries site identity: title, tagline, canonical URL, indexability, languages, and any extra `<head>` items you want injected on every page.

Settings flow through `state.settings` and surface in templates as `_pageContext.site` (and as `settings` in the data cascade when you keep them in `_data/settings.js`).

---

## The settings shape

```js
export default {
	title: 'Your site',
	tagline: 'A short site-wide line.',
	url: 'https://www.example.com',
	noindex: false,
	defaultLanguage: 'en',
	languages: { en: {}, fr: {} },
	head: {
		link: [],
		script: [],
		meta: [],
		style: []
	},
	seo: {
		preserveQueryParams: false,
		ogImage: null,
		openGraph: {},
		twitter: {}
	}
};

await eleventyConfig.addPlugin(baseline(settings));
```

Every key is optional. Baseline logs a warning if `settings.url` is missing: canonicals are then omitted, and other absolute URLs (sitemap entries, social images) fall back to relative paths.

---

## Keys

{% stepsBlock "compact" %}

- **title** (`string`)
  - site title. Used by the head module to compose `<title>` (`Page title – Site title`) and by the navigator template.

- **tagline** (`string`)
  - short site-wide line. Used as the home page's title suffix and as the default `<meta name="description">` when a page has no description of its own.

- **url** (`string`)
  - absolute site URL, including protocol. Used to resolve canonical URLs, sitemap entries, and absolute image URLs in the image shortcode. Baseline warns at startup if this is missing.

- **noindex** (`boolean`, default `false`)
  - when `true`, every page renders `<meta name="robots" content="noindex, nofollow">` and the sitemap is not emitted. Useful for staging environments. Pages can also opt out individually via `noindex: true` in front matter.

- **defaultLocale** (`string`)
  - BCP 47 default locale (e.g. `'en-US'`). Preferred. Sets the site's default language and the fallback `page.locale` for pages whose language has no `locale` of its own. Either this or `defaultLanguage` is required for multilingual activation.

- **defaultLanguage** (`string`)
  - Short language code (e.g. `'en'`). A writer-side alias for `defaultLocale`: set it when you do not need a region, and Baseline derives the locale from it. The default-language permalinks are unprefixed; other languages live under `/<lang>/`.

- **languages** (`object | string[]`)
  - language map. Object form `{ en: {}, fr: {} }` or array shorthand `['en', 'fr']` (arrays are normalised to objects with empty entries; invalid entries are dropped, logged when `verbose: true`). Required for multilingual activation. Per-language overrides are supported for `title`, `tagline`, and `locale` (the BCP 47 tag, e.g. `'en-US'`, that becomes `page.locale` for pages in that language):

  ```js
  export default {
  	languages: {
  		en: { title: 'Your site', tagline: 'A short line.', locale: 'en-US' },
  		fr: { title: 'Votre site', tagline: 'Une ligne courte.', locale: 'fr-FR' }
  	}
  };
  ```

- **head** (`object`)
  - additive `<head>` extras injected on every page. Four arrays, one per element type. Each entry is an object whose keys become attributes on the rendered tag.

  ```js
  export default {
  	head: {
  		link: [
  			{ rel: 'stylesheet', href: '/assets/css/index.css' },
  			{ rel: 'icon', href: '/favicon.svg' }
  		],
  		script: [{ src: '/assets/js/index.js', defer: true }],
  		meta: [{ name: 'theme-color', content: '#0a0a0a' }],
  		style: []
  	}
  };
  ```

  Pages can add their own entries through the same shape in front matter; Baseline merges and deduplicates. See the [[head | head module]] for the merge rules.

  {% alertBlock %}

  This is also where you wire the asset pipeline into your pages. Baseline compiles `assets/css/index.css` and `assets/js/index.js` to `/assets/css/index.css` and `/assets/js/index.js` at the site root, but it does not auto-inject them. Declare a `link` and a `script` entry as above. The default docs site does exactly this.

  {% endalertBlock %}

  Output filenames are unhashed today. Cache-busting via hashed filenames is on the roadmap, and the entrypoint declaration shape may change to accommodate it.

  In practice `link`, `script`, and `meta` carry almost everything you need. `style` is supported for parity but rarely used; inline `<style>` blocks usually belong in your CSS pipeline rather than the head extras list.

- **seo** (`object`)
  - site-wide SEO defaults. They feed the resolved `seo` namespace and the SEO payload the head module emits (canonical, Open Graph, Twitter Card, JSON-LD). All optional.

  ```js
  export default {
  	seo: {
  		// keep the query string on canonical URLs (default: strip it)
  		preserveQueryParams: false,
  		// default share card; the url must be absolute (it lands in the JSON-LD graph)
  		ogImage: { url: 'https://www.example.com/og.jpg', width: 1200, height: 630, alt: '' },
  		// default Open Graph and Twitter values, overridable per page
  		openGraph: {},
  		twitter: {}
  	}
  };
  ```

  The share image default lives here, in `settings.seo`, because it is page presentation: the same shelf as `og:type` and `twitter:card`. Identity images, an organisation logo or a person's photo, live in the `schema` cascade key instead, because they are properties of the entity. All three end up as graph `ImageObject` nodes, so the split is about where the value is authored, not what it becomes.

{% endstepsBlock %}

---

## SEO front matter

Beyond `settings.seo`, a page carries its own SEO through front-matter keys. Baseline reads them into the resolved SEO values and the JSON-LD graph the head module emits. Each is optional; a page with none still gets a complete, valid graph from the site defaults.

{% tableBlock true %}

| Key                   | Type                 | What it does                                                                                                                                                                          |
| --------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ogImage`             | `string` or `object` | Per-page share card. Overrides `settings.seo.ogImage`. Object form `{ url, width, height, alt }` lets the graph emit a sized `ImageObject`; a bare string emits a url-only `og:image`. |
| `canonical`           | `string`             | Explicit canonical URL. Without it the canonical is the page's own absolute URL.                                                                                                     |
| `preserveQueryParams` | `boolean`            | Keep the query string on this page's canonical. Overrides the site default. The fragment is always stripped.                                                                         |
| `pageType`            | `string`             | Overrides the WebPage node's schema.org `@type` (e.g. `AboutPage`, `CollectionPage`).                                                                                                |
| `articleType`         | `string`             | Overrides the Article node's `@type` (e.g. `BlogPosting`). Takes effect only when the page is an article (`type: article`).                                                          |
| `topics`              | `string` or `string[]` | Keyword classification. Emitted as schema.org `keywords` on the WebPage and Article nodes, and as `og:article:tag` on article pages. Separate from Eleventy's native `tags`, which Baseline leaves alone. Bring your own taxonomy: if you want topic-listing pages, build a collection from `topics` yourself. |
| `datePublished`       | `string`             | Publish date for the structured data. Defaults to the page's `date`. Sets `datePublished` on the WebPage and Article nodes.                                                            |
| `dateModified`        | `string`             | Last-modified date for the structured data. Resolves front matter first, then the git last-commit date, then the publish date. Sets `dateModified`.                                    |

{% endtableBlock %}

Identity authoring, your organisation and author profile plus any extra schema.org nodes, lives in the `schema` cascade key rather than per-page front matter.

---

## Multilingual activation

Three things must be set together: `options.multilingual: true`, `settings.defaultLocale` or `settings.defaultLanguage`, and a non-empty `settings.languages`. Nothing is inferred. If any of the three is missing, the multilang module skips activation and logs why.

See the [[multilang | multilang module]] for what activation enables (per-language collections, hreflang, i18n filters).

---

## Where settings surface

| Surface             | Reads                                                                                 |
| ------------------- | ------------------------------------------------------------------------------------- |
| `_pageContext.site` | `title`, `tagline`, `url`, `noindex` (per-language `title`/`tagline` if present)      |
| `_pageContext.meta` | composed `<title>`, default description from `tagline`, robots from `noindex`         |
| Head module         | `head.{link, script, meta, style}` extras                                             |
| `seo` namespace     | `seo` defaults: canonical policy, share image, Open Graph and Twitter values          |
| Sitemap module      | `noindex` (skip when `true`); `defaultLanguage` and `languages` for per-lang sitemaps |
| Multilang module    | `defaultLanguage`, `languages`                                                        |
| Image shortcode     | `url` for absolute image URLs                                                         |

---

## See also

- [[plugin-entrypoint | Plugin entrypoint]] - the `options` argument and what Baseline registers.
- [[page-context | Page context]] - how settings are normalised per page.
- [[head | Head module]] - head extras merge rules.
- [[multilang | Multilang module]] - activation and per-language behaviour.
