Empty @nuxtjs/sitemap with @nuxt/content document driven mode
I'm using
@nuxt/content
and @nuxtjs/sitemap
with the following config
And I have some content
But when I hop over to http://localhost:3000/sitemap.xml I see absolutely nothing.
Going off of https://nuxtseo.com/sitemap/integrations/content#document-driven-mode it sounded like no configuration besdies documentDriven: true
is necessary
When using documentDriven mode, all paths will be automatically added to the sitemap.But under #markdown-opt-in it does say
If you want to add markdown pages to your sitemap without any extra config, you can use the sitemap key on your frontmatter. You must provide a loc value, or the page must have a path.Does this pertain to document driven mode too? As in, even though I can go to http://localhost:3000/leadership, I still need to manually specify
loc: /leadership
in the markdown frontmatter?
And with that the page is included in the sitemap. But is this working as intended?7 Replies
Sorry about that lol
ik
I did this on purpose to troll
I see I see. Was wondering why
@nuxtjs/sitemap
autocompleted to youXD
:trol:
Oh I guess I just needed to
npx nuxt build
and npx serve .output/public
instead of pnpm run dev
. Now I see the whole tree