ekoeryanto / vuepress-plugin-sitemap

Sitemap generator plugin for vuepress.
MIT License
93 stars 19 forks source link

Add global changeFreq to VuePress config #17

Closed staghouse closed 4 years ago

staghouse commented 5 years ago

The simplest implementation for me is:

    [
      'sitemap',
      {
        hostname: 'https://mtgjson.com',
        outFile: 'atom.xml',
      },
    ],

However, the output always has each route as a change frequency of daily. I would either like to be able to remove this with a simple prop value without having to go through all the URLs

such as

    [
      'sitemap',
      {
        hostname: 'https://mtgjson.com',
        outFile: 'atom.xml',
        global: {
          changefreq: "weekly"
        }
      },
    ],

Is there a way to do this already without having to iterate through all the URLs?

ekoeryanto commented 5 years ago

If you are using v0.x then you can use -F parameter, see https://github.com/ekoeryanto/vuepress-plugin-sitemap/blob/0030d5cd632ab8bb11ccc0eb88b87ca255923a70/cli.js#L15

for v1.x https://github.com/ekoeryanto/vuepress-plugin-sitemap/blob/0030d5cd632ab8bb11ccc0eb88b87ca255923a70/index.js#L22