Skip to content

FEAT: CMS page SEO metadata (noindex toggle, canonical) #233

Description

@Arnimag

User Story

In order to ensure CMS-managed pages are correctly discovered or hidden by search engines
As a content editor
I want to control the title, description, canonical URL, and indexability of each CMS page directly from the CMS

Acceptance Criteria

  • 1. Each CMS page's browser tab title matches the SEO title configured in the CMS.
  • 2. The meta description for the page matches the value set in the CMS.
  • 3. If a page is marked as non-indexable in the CMS, it does not appear in search engine results.
  • 4. If a canonical URL is set in the CMS, it is used as the canonical for that page; otherwise the current page URL is the canonical.
  • 5. Open Graph title and description tags reflect the SEO fields from the CMS.
  • 6. Every CMS page has a title and description.
  • 7. Title and description resolved per locale from CMS.
  • 8. Content is managed in the CMS — changes to copy or images take effect without a code deployment.

Background & Resources

Details: Next.js generateMetadata is called server-side. Contentful content type has an SEO field group. Noindex maps to robots: { index: false } in Next.js metadata. Canonical defaults to alternates.canonical = request URL if not set in CMS.

Key files:

  • apps/presentation/app/[locale]/(main)/p/[...slug]/page.tsxgenerateMetadata function reads SEO fields from BFF CMS page response
  • BFF CMS page response model — includes seo.title, seo.description, seo.noindex, seo.canonical
    Links/Screenshots: (Drag and drop images or paste links here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions