Skip to content

Conversation

@willwillems
Copy link
Contributor

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

@webmasterish
Copy link
Owner

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

@willwillems
Copy link
Contributor Author

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

@webmasterish
Copy link
Owner

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
Copy link
Contributor Author

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
Copy link
Owner

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'
  • it resides in whatever the posts_directories are set to (the defaults are blog and _posts)

More details about how that's done is in:

PLUGIN.is_feed_page = ( page ) =>

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

@webmasterish webmasterish merged commit 1b15b25 into webmasterish:master Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants