Sitemap.xml not generated correctly

Can anyone help me?
I noticed that it does not generate the sitemap.xml correctly. (https://hdsplus.co/sitemap.xml)

The “sitemap-posts.xml” file only shows 1 article out of 86.
The “sitemap-tags.xml” file does not show all the tags either.

I created the Sitemap for Google News as indicated in the official tutorial (Add your Ghost site to Google News) with the URL https://hdsplus.co/sitemap/.

I don’t know if it has something to do with it…
I’m using the latest version of Casper Theme & Ghost CMS.

Thanks…

EDIT 2: Now the /sitemap.xml only shows “sitemap-pagès.xml”…

You have numerous 404 errors across your site, which is likely the cause of the problem. Have you edited routes.yaml or changed the site structure in some way?

Hi @mjw ,

What 404 errors do you see on my site?

My routes.yaml:

routes:
  /sitemap/:
    template: sitemap
    content_type: text/xml

/:     
    data: page.home
    template: page
    
collections:
  /:
    permalink: /{slug}/
    template: index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

Thanks

UPDATE: It is very strange. All my articles had been updated to “permalink” → “/p/xxxxxxxxxxxxxxxxxx”. I had to change it to “draft” and re-publish to get it to update the URL. Now the sitemap.xml works correctly too.

I don’t understand what changes you’ve made, but the 404 errors appear to be resolved now.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.