webmasterish / vuepress-plugin-feed

RSS, Atom, and JSON feeds generator plugin for VuePress 1.x
MIT License
48 stars 13 forks source link

Fix bracket typo #2

Closed willwillems closed 5 years ago

willwillems commented 5 years ago

I believe those [ ] need to be { }, no?

webmasterish commented 5 years ago

Both ways are supported (Plugin Options). The example I used is known as Babel Style.

willwillems commented 5 years ago

Ah but then you are missing a pair of brackets or am I not seeing something?

webmasterish commented 5 years ago

Just realized that it's missing the outer brackets of the plugins array; babel style should be like this:

const feed_options = {
  canonical_base: 'https://webmasterish.com',
};

module.exports = {
  plugins: [
    [ 'feed', feed_options ]
  ]
}

and the object style as per your changes.

Feel free to update it if you want.

Thanks for pointing it out!

willwillems commented 5 years ago

Btw do you have an example somewhere of a project using this plugin, I can't seem to get it to generate the feeds.

webmasterish commented 5 years ago

It's probably my bad as I did not add any information on how pages are filtered.

A page is added as a feed item if one of the following conditions is met:

More details about how that's done is in: https://github.com/webmasterish/vuepress-plugin-feed/blob/1460931138f00d13407019decbbbe87d47baad72/index.js#L390

Appreciate your contribution and making me realize that I made the same mistake in every other vuepress plugin repo (the curse of copy paste).