Closed willwillems closed 5 years ago
Both ways are supported (Plugin Options). The example I used is known as Babel Style.
Ah but then you are missing a pair of brackets or am I not seeing something?
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!
Btw do you have an example somewhere of a project using this plugin, I can't seem to get it to generate the feeds.
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:
frontmatter.type === 'post'
posts_directories
are set to (the defaults are blog
and _posts
)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).
I believe those
[
]
need to be{
}
, no?