routes.yaml
Every key of config/sites/<key>/routes.yaml: routes with their URI patterns per locale, index pages, nesting, pagination, facets, feeds, calendars and landing pages, the home page, configuration redirects and special pages.
config/sites/<key>/routes.yaml maps the site’s content types to URLs, declares its home page, configuration redirects and special pages.
home: { type: page, slug: home }
routes:
- type: article
uri: "/stories/{slug}"
index: "/stories"
paginate: 12
facets: [theme]
feed: { summary: standfirst }
- type: page
uri: "/{slug}"
priority: 100
nest: true
redirects:
- { from: "/news/*", to: "/stories/{1}", status: 301 }
special:
search: "/search" engine-dmo dev route add routes a type with its id, and engine-dmo describe route <path> says which route answers a path. Redirects edited by staff live in the database and are managed with engine-dmo redirects. See Sites, locales and routes and Redirects and URLs.
| Key | Type | Default | Meaning |
|---|---|---|---|
home | object | The home page: a type and a slug, or a singleton type alone | |
home.slug | string | Its slug; omitted for a singleton type | |
home.type | string | Required | The type of the home page’s document |
redirects | list of objects | [] | Redirects held in configuration. A * in from is captured as {1} |
redirects[].from | string | Required | The path or pattern |
redirects[].locale | string | Applies in one locale only | |
redirects[].status | integer | 301 | 301, 302, 307, 308 or 410 |
redirects[].to | string | The target; omit with status 410 | |
routes | list of objects | [] | The site’s routes, one per routed type |
routes[].calendar | object | An iCalendar feed of the route’s events | |
routes[].calendar.days | integer | How many days ahead the calendar covers | |
routes[].calendar.description | string | The field used as each event’s description | |
routes[].calendar.field | string | The occurrence field the calendar reads | |
routes[].calendar.geo | string | The field used as each event’s coordinates | |
routes[].calendar.limit | integer | The most events in the calendar | |
routes[].calendar.path | map of string | The index path plus a tail | The calendar’s path, one string or per locale |
routes[].calendar.place | string | The field used as each event’s location | |
routes[].calendar.title | map of string | The calendar title per locale | |
routes[].facets | list of string | [] | The fields an index page can be filtered by |
routes[].feed | object | A syndication feed of the route’s entries | |
routes[].feed.body | string | The field the full content is read from, with content: full | |
routes[].feed.content | string | summary | summary (items carry their summary) or full (items carry the body as HTML too) |
routes[].feed.formats | list of string | [rss, atom, json] | The formats served: rss, atom, json. The path serves .xml, .atom and .json |
routes[].feed.limit | integer | 20 | The most entries in the feed, 1 to 100 |
routes[].feed.path | map of string | The index path plus a tail | The feed’s path, one string or per locale |
routes[].feed.summary | string | The type’s summary field | The text field each item’s summary is read from |
routes[].feed.title | map of string | The site name and the type’s plural | The feed title per locale |
routes[].id | string | Written for you | The element’s stable id. Written by engine-dmo check --fix; never write or change it by hand |
routes[].index | any | The index (listing) page’s path, one string or a map per locale | |
routes[].landings | list of objects | [] | Generated landing pages under the route (engine-dmo): one per place, category or month combination with enough results |
routes[].landings[].category | string | The field giving the category | |
routes[].landings[].content | string | A content type whose document, matched to a landing, adds editorial text | |
routes[].landings[].description | any | The meta description pattern per locale, with {count}, {examples} and the rest | |
routes[].landings[].id | string | Written for you | The element’s stable id. Written by engine-dmo check --fix; never write or change it by hand |
routes[].landings[].key | string | Required | The landing family’s key |
routes[].landings[].min_results | integer | The fewest results a landing page needs to exist | |
routes[].landings[].month | string | The occurrence field giving the month, for events | |
routes[].landings[].place | string | The relation field giving the place | |
routes[].landings[].slugs | map of any | Per category value, its slug per locale | |
routes[].landings[].title | any | The title pattern per locale, with {place}, {category}, {month} | |
routes[].landings[].uri | any | Required | The landing path under the index, with {place}, {category} or {month} |
routes[].nest | boolean | false | Entries nest under their parent entry’s path |
routes[].paginate | integer | Entries per index page | |
routes[].parent | object | Builds the entry path from a related document: relation (the relation field) and uri (the pattern) | |
routes[].parent.relation | string | Required | The relation field naming the parent document |
routes[].parent.uri | any | Required | The pattern, such as /{category}/{slug} |
routes[].priority | integer | 0 | Orders two patterns of one shape, lowest first, and settles check’s ambiguity error. A document is found by its stored address, so both routes keep answering for their own documents |
routes[].type | string | Required | The content type the route serves |
routes[].uri | any | Required | The entry URL pattern, one string or a map per locale, with placeholders such as {slug} |
special | map of any | The paths of the engine’s special pages, such as search: /search and sitemap: /sitemap.xml, one string or per locale |
site.yaml
Every key of config/sites/<key>/site.yaml: the site name, hosts, country, time zone, locales and URL strategy, navigation slots, template roots, SEO and robots, accessibility statement, widgets, headless delivery, assets, mail sender and outbound links.
endpoints.yaml
Every top-level key of config/sites/<key>/endpoints.yaml: declared endpoints with their path, methods, access, rate limit, spam controls, inputs, validation, steps and response.