Skip to main content

Search and SEO

The Creuva header can show a magnifying glass (field Search in the header, legend Search). It opens a search field above the page – also with Ctrl+K (⌘+K) or / – and sends the search terms to the selected search results page. Without the checkbox, no magnifying glass appears.

The results page holds the core module Website search. Creuva styles it with its own templates: a large search field, results as cards with the page path, highlighted search terms and an optional image, plus tips when nothing was found.

creuva:install --with-pages and the demos create the page „Suche“ (search; hidden, noindex, not in the search index) and activate the search in the header. In a demo definition of your own, header: { search: suche } (alias of the results page) is enough.

The page layout only adds the main section to the search index. Header, footer and copyright therefore don’t show up in the search results.

Note

Rebuild the search index once after an update: back end › System › Maintenance or

vendor/bin/contao-console contao:crawl

On all indexable pages, the Creuva layout outputs Open Graph tags and twitter:card: title, description, address (as in the canonical link, without tracking parameters), language (og:locale, e.g. de_DE) and a preview image of 1200 × 630 px.

For the preview image, the layout uses, in this order:

  1. on pages with a news reader, the image of the news item – the item then appears as og:type “article” with publication and modification date
  2. the first hero, image or other element with an image in the main section, also inside element groups
  3. the Preview image for social networks in the website root (metadata, field creuvaOgImage)

SVG files are skipped, WebP, AVIF and GIF are output as PNG, and JPEG stays JPEG. Smaller images are not upscaled.

Tip

Set a preview image for social networks in the website root. Then pages without an image also get a link preview.

Canonical

Website roots created by creuva:install have the canonical tag enabled. On existing websites, you enable it in the website root. The Styleguide is set to noindex,nofollow.