Skip to content

Give docs pages social cards and article structured data - #5625

Open
dimitrieh wants to merge 1 commit into
mainfrom
docs/seo-og-and-article-schema
Open

Give docs pages social cards and article structured data#5625
dimitrieh wants to merge 1 commit into
mainfrom
docs/seo-og-and-article-schema

Conversation

@dimitrieh

@dimitrieh dimitrieh commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

Docs pages had a title and nothing else in their head. This adds what the handbook already has:

  • useSeoMeta for og:description, og:url, og:type and the twitter card tags. og:title stays unset because it infers from the resolved title, brand suffix included.
  • defineOgImage('Default', { section: 'Docs' }), so docs links unfurl with the branded card instead of bare.
  • useSchemaOrg([defineArticle({ '@type': 'TechArticle' })]), with dateModified from the git commit stamp docs-sync writes into the synced frontmatter.
  • Derivation lives in nuxt/lib/docs-seo.mjs with node --test coverage.

Titles are unchanged: title stays the bare heading and the siteName template param stays as #5593 left it.

Verified on this PR's deploy preview: each docs page serves an og:image built from its own title with section_Docs, og:type=article, an absolute og:url, the twitter pair, and an ld+json node typed ["Article","TechArticle"] with headline and a resolved dateModified. og:title comes out as Bill of Materials • FlowFuse Docs nested and Documentation • FlowFuse at the root.

Correction to an earlier claim in this PR: I first said docs pages emitted <meta name="description" content="">. They do not, and never did. Production and this preview both serve docs pages with no description meta and no og:description at all, including /docs/ whose synced frontmatter has a meta.description. The old code read page.meta.description, coalesced a miss to an empty string, and unhead dropped the tag. This PR does not fix that and does not claim to. Suspected cause, unconfirmed: meta is a built-in @nuxt/content field for frontmatter keys a schema does not declare, and the docs schema in content.config.ts declares meta as well, so a description written there never reaches the page. If that holds, the fix is in the sync, hoisting it onto the built-in top-level description.

Performance: one Satori render per docs page on the first build. The content-addressed ogImage.buildCache means later builds only re-render pages whose title changed.

Related Issue(s)

None.

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

Docs pages carried a title and a description and nothing else: no og:image, no
og:url, no article-level structured data. Links to them unfurled bare, while the
handbook already had all of it.

useSeoMeta now covers the og and twitter tags, keeping the brand suffix that
#5593 moved into the global title template (og:title infers from the resolved
title, so it stays unset). defineOgImage renders the shared Default card with
"Docs" as its section, and useSchemaOrg emits a TechArticle, the schema.org
subtype for product documentation, with dateModified read from the git commit
stamp docs-sync writes into the synced frontmatter.

The derivation moved into nuxt/lib/docs-seo.mjs so node --test can cover it.
That also drops an empty tag: pages with no description emitted
<meta name="description" content=""> before.
@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit fe3fc6d
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a83fb577ee54f000832efce
😎 Deploy Preview https://deploy-preview-5625--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 63 (🟢 up 19 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 85 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

Preview affected pages:

Every page under /docs/ is affected in the same way; the three above cover the root, a page with no description, and a nested section page. The head tags are the change, so view source rather than the rendering.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant