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 content
website for documentation purposes and using theNuxt Sitemap
in 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
sitemap
information to my/content/docs
with all themarkdown
or .md files such as:/content/docs/introduction/index.md
:I can generate the
sitemap.xml
file during thenpm run generate
but this generates theurl
only for the routes that are present in/content/docs
where I have added thesitemap
information to myindex.md
files such as this in:I have many images within this
index.md
file but these images are for some reason not included in thesitemap.xml
file. I don't want to specify each image in my all.md
files rather want a dynamic approach whereNuxt Content/Sitemap
can automatically scan and include all images in my/content/docs
so it's all included insitemap.xml
file.I added the following:
This will add only the specified image here to my
sitemap.xml
file. 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.js
file?And a file in
/server/api/__sitemap__/urls.ts
but this also does not make any difference and I do not get my images or videos in sitemap.xml file:layouts/default.vue
with<main>
something like this:Previously I was just using the
<slot />
. Even after adding the<main>
when I generate the.output
I 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