noindex fix

This commit is contained in:
2026-10-12 14:35:51 +02:00
parent 5c466b664c
commit 2665cfa7b6
22 changed files with 110 additions and 145 deletions
+9 -1
View File
@@ -57,6 +57,13 @@ type BuildMetadataArgs = {
locale: string
/** SEO meta from the document (plugin-seo group). */
meta?: null | SeoMeta
/**
* Top-level noindex flag (buildNoindexField). Checked alongside meta.noindex:
* plugin-seo's meta group doesn't declare noindex, so a mirror into
* meta.noindex is stripped on save — the top-level field is the one that
* persists. Either being true emits robots index:false.
*/
noindex?: boolean | null
/** Page title or site name first. Defaults to 'page-first'. */
order?: TitleOrder
/**
@@ -110,6 +117,7 @@ export function buildMetadata({
imageUrl,
locale,
meta,
noindex,
order,
pageTitle,
prefix,
@@ -163,7 +171,7 @@ export function buildMetadata({
// robots: noindex pages are excluded (follow keeps link authority). Indexed
// pages get generous snippet/preview limits so Google can show rich results
// (long snippets, large image previews, full video previews).
...(meta?.noindex
...(noindex || meta?.noindex
? { robots: { follow: true, index: false } }
: {
robots: {