我尝试构建的站点地图找不到动态呈现的博客页面。
yarn build // running nuxi build
node .output/server/index.mjs
nuxt:^3.10.2,@nuxtjs/sitemap:^5.1.0
显示博客文章,通过我的组件之一中的 apollo 进行获取:
const { data, pending } = await useAsyncQuery(getPosts, { size: numArticlesPerPage, offset: offset.value })
另外,根据我添加到 nuxt.config.ts 中的文档:
nitro: {
prerender: {
crawlLinks: true,
routes: ["/", "/blog"], // I also tried adding the sitemap file here directly
},
},
您需要为 nuxt sitemap 添加 API 源来生成页面。