Skip to content

SEO metadata (per-page meta, Open Graph, sitemap) #210

Description

@marufamd

Parent

#195

What to build

Implement proper SEO metadata and a dynamic sitemap based on Strapi content.

Strapi side:

  • Create an SEO component with fields:
    • meta_title (string)
    • meta_description (text)
    • share_image (media, single) — Open Graph image
  • Add the SEO component to the Page collection type as an optional field.
  • Add global fallback SEO fields to the SiteSettings single type.

Frontend side:

  • Update the TanStack Start root layout to merge global SEO settings with per-page SEO data.
  • Update the catch-all route to use TanStack Start's meta function, outputting standard title, description, and Open Graph tags <meta property="og:title" ...>.
  • Create a routes/sitemap.xml.ts (or equivalent) endpoint that queries Strapi for all published Pages and generates a standard XML sitemap. Ensure URLs use the correct production domain from environment variables.

Acceptance criteria

  • SEO component exists in Strapi and is attached to the Page collection and Site Settings
  • Pages render specific title, description, and Open Graph meta tags when configured
  • Pages fall back to global Site Settings SEO data if per-page data is missing
  • /sitemap.xml route generates a valid XML sitemap containing all published CMS pages
  • Sitemap URLs use the correct base URL from environment configuration

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions