noindex fix
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user