Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority and ChangeFreq properties are missing in the sitemap generation #1525

Open
2 tasks
ricardochl opened this issue Dec 27, 2024 · 2 comments
Open
2 tasks
Labels
enhancement New feature or request

Comments

@ricardochl
Copy link

ricardochl commented Dec 27, 2024

Which scope/s are relevant/related to the feature request?

create-analog

Information

Analog does not have a built-in way to set up the priority and changefreq properties in the current sitemap configuration.

Describe any alternatives/workarounds you're currently using

It would be a potential structure for the routes param:

prerender = {
  routes: async () => [
    {
      path: '/',
      priority: 1.0,
      changefreq: 'daily',
    },
    {
      path: '/category',
      priority: 0.8,
      changefreq: 'weekly',
    },
    {
      path: '/product',
      priority: 0.7,
      changefreq: 'monthly',
    },
    {
      path: '/blog',
      priority: 0.5,
      changefreq: 'weekly',
    },
    {
      path: '/about/:slug',
      priority: 0.3,
      changefreq: 'yearly',
    },
    {
      path: '/contact',
      priority: 0.3,
      changefreq: 'yearly',
    },
  ],
  sitemap: {
    host: 'hostURL',
  },
};

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@ricardochl ricardochl added the enhancement New feature or request label Dec 27, 2024
@ricardochl ricardochl changed the title Priority and ChangeFreq values are missing in the sitemap generation Priority and ChangeFreq properties are missing in the sitemap generation Dec 27, 2024
@berhir
Copy link

berhir commented Jan 8, 2025

I am also interested in setting the <lastmod> of each page (for example to the last modified date of the markdown file).
Setting <priority> and <changefreq> would be nice too, but these values are not so important anymore and Google completely ignores these values according to the docs:

  • Google ignores <priority> and <changefreq> values.
  • Google uses the <lastmod> value if it's consistently and verifiably (for example by comparing to the last modification of the page) accurate.

@brandonroberts
Copy link
Member

I think it would be useful to make the sitemap more flexible also. Maybe it would be better to have a sitemap key in the prerender route object and use those keys to add additional items to each sitemap entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants