Nuxt Sitemap does not include the images even though the Nuxt content pages contain many images #2755
Unanswered
Aravinda93
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am developing a
Nuxt contentwebsite for documentation purposes and using theNuxt Sitemapin it.I have created a similar repo as my original project on CodeSandBox. Can someone please have a look and provide some solutions on the automatic generation of sitemap for images in the Nuxt Content project?
I am adding the
sitemapinformation to my/content/docswith all themarkdownor .md files such as:/content/docs/introduction/index.md:I can generate the
sitemap.xmlfile during thenpm run generatebut this generates theurlonly for the routes that are present in/content/docswhere I have added thesitemapinformation to myindex.mdfiles such as this in:I have many images within this
index.mdfile but these images are for some reason not included in thesitemap.xmlfile. I don't want to specify each image in my all.mdfiles rather want a dynamic approach whereNuxt Content/Sitemapcan automatically scan and include all images in my/content/docsso it's all included insitemap.xmlfile.I added the following:
This will add only the specified image here to my
sitemap.xmlfile. However, I have a lot of images in different .md files within myNuxt content /content/docs. How to include all dynamically and directly without specifying each of them here innuxt.config.jsfile?And a file in
/server/api/__sitemap__/urls.tsbut this also does not make any difference and I do not get my images or videos in sitemap.xml file:layouts/default.vuewith<main>something like this:Previously I was just using the
<slot />. Even after adding the<main>when I generate the.outputI don't see image-related things insitmap.xml.References:
Is there any way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions