Public UI: canonical, hreflang, Open Graph and structured data in the page head

Open
#476 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript
Domain
frontend, web-dev

Research direction

Start with packages/publicui/routes/index.tsx and inspect its meta() and links() functions alongside the root loader data. The issue leaves the design open between route metadata and an add-on registry, and translation data would need an API expander. Define that approach with maintainers before implementation; done means content routes emit the requested canonical, multilingual, social and add-on structured data tags, including SEO canonical and noindex behavior where configured.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.

The head of a public page carries a title, a description and a generator tag. In packages/publicui/routes/index.tsx, meta() returns those three and links() returns the stylesheet, the icons and the fonts. Aurora's own packages emit no rel="canonical", no rel="alternate" hreflang, no Open Graph or Twitter tags and no JSON-LD. Volto has ContentMetadataTags (the canonical link, og:title, og:url, og:image, og:description, twitter:card, and noindex from the SEO fields) and AlternateHrefLangs.

What it cost on a site with thirteen languages, read in Google Search Console: the site root redirects to /en, no page declares a canonical, and /en was filed as "Duplicate without user-selected canonical" of /. Other pages were "Crawled – currently not indexed". Nothing in a page relates it to its twelve translations; today only our sitemap does.

Describe the solution you'd like

For the content routes of the public UI:

  • a self rel="canonical" link with the absolute public URL, and the SEO behavior's canonical URL and noindex where a site has them;
  • on a multilingual site, rel="alternate" hreflang links for the item's translations, plus x-default;
  • Open Graph: og:title, og:description, og:url, og:type, og:site_name, og:locale, and og:image from the item's preview or lead image; twitter:card;
  • a way for an add-on to add structured data (JSON-LD) per content type, since what belongs there is the site's own: a person, an event, an album.

The question we brought to the sprint is where this should live: in the public route's meta() and links() from the root loader's data (the translations would then come through an API expander), or as a registry utility that add-ons extend. Tell us which and we will send a pull request.

Describe alternatives you've considered

Carrying it as a patch on the public route in our own build, which is what we would otherwise do next. We would rather it lands once, for every site.

Additional context

Checked against main at e6dc6a3 (2026-11-28): hreflang and ld+json appear in no file of apps/ or of Aurora's packages, and Open Graph tags only in the documentation's own front matter and in the bundled Volto package. No open or closed issue or pull request asks for it. Raised at the Salamina sprint; the companion request is the one for robots.txt and the XML sitemap.

Dominant language
JavaScript
Stars
10
Forks
9
Avg merge
4d 7h
Merged PRs (30d)
54

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plone/aurora

All issues in plone/aurora

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.