如何在nextjs13元数据中添加noindex?

ht4b089n  于 2023-03-02  发布在  其他
关注(0)|答案(1)|浏览(162)

如何在nextjs13的元数据中添加noindex?
尝试添加到“noindex:true”在此处未成功:

export const metadata = {
  title: "Website title",
  description:
    "My description",
};
xwbd5t1u

xwbd5t1u1#

export const metadata = {
  robots: {
    index: false,
    follow: true,
    nocache: true,
    googleBot: {
      index: true,
      follow: false,
      noimageindex: true,
      'max-video-preview': -1,
      'max-image-preview': 'large',
      'max-snippet': -1,
    },
  },
};

https://beta.nextjs.org/docs/api-reference/metadata#robots

相关问题