Skip to content

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

Open
dimitrieh wants to merge 3 commits into
mainfrom
docs/seo-og-and-article-schema
Open

dimitrieh wants to merge 3 commits 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 in their head and nothing else. This adds what the handbook already has, plus the description docs pages never had:

  • useSeoMeta for the description, og:description, og:url, og:type and the twitter card tags.
  • defineOgImage('Default', { section: 'Docs' }), so docs links unfurl with the branded card.
  • useSchemaOrg with a TechArticle, dated from the git stamp docs-sync writes into the frontmatter.

The description was missing because @nuxt/content reserves meta, so the meta: block in docs frontmatter was dropped at parse time. The docs collection now gets the same shim the blog and webinars use: the content:file:beforeParse hook renames meta: to structuredData:, and the schema declares that. A page with no written description falls back to the paragraph under its H1.

This covers every page under /docs, the guides from nuxt/content-guides/ included, since both land in the one docs collection.

The derivation sits in nuxt/lib/docs-seo.mjs with node --test coverage. It calls docsPageTitle for the heading, so the title, the og:title and the card can not drift apart.

Titles are unchanged.

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)

@netlify

netlify Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for flowfuse-website ready!

Name Link
🔨 Latest commit 348b735
🔍 Latest deploy log https://app.netlify.com/projects/flowfuse-website/deploys/6ab6d5d83466ee00082897a3
😎 Deploy Preview https://deploy-preview-5625--flowfuse-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: 44 (🟢 up 13 from production)
Accessibility: 95 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (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.

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
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.
@dimitrieh

Copy link
Copy Markdown
Contributor Author

FYI: the failing build here isn't caused by this PR. Tracked in https://github.com/FlowFuse/engineering/issues/460. It's resolved now, re-running the checks.

No page under /docs has had a description. The docs collection declared its
frontmatter `meta:` block as a schema field, but @nuxt/content reserves `meta`
and overwrites it with the parser's leftovers, so every description was dropped
and the new og:description and TechArticle description came out empty too.

The docs collection now takes the same shim the blog and webinars use: the
content:file:beforeParse hook renames `meta:` to `structuredData:` before
parsing, and the schema declares that. docsSeo reads the written description
first and falls back to the paragraph @nuxt/content takes from under the H1.
The guides overlaid from nuxt/content-guides/ are in the same collection and
get the same fix.
@dimitrieh
dimitrieh force-pushed the docs/seo-og-and-article-schema branch from dc95f7e to 348b735 Compare September 25, 2026 20:13

This branch was successfully deployed

1 active (outdated) deployment
Preview — f8f260f0 Deployed Sep 10, 2026 by github-actions[bot]
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