谷歌分析 noindex 问题 nextjs

问题描述 投票:0回答:1
next.js google-analytics analytics next.js13
1个回答
0
投票

您可以使用 Metadata Nextjs 组件从布局页面导出元数据,并将所有元数据标签作为对象。

import type { Metadata } from 'next'


export const metadata = {
  robots: {
    index: true,
    googleBot: {
      index: true,
    },
  },
};

这将覆盖 NextJS 服务器默认生成的元标记,并具有许多其他自定义功能。

© www.soinside.com 2019 - 2024. All rights reserved.