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

Add external plugin config #216

Closed
wants to merge 6 commits into from

Conversation

dacsang97
Copy link

@dacsang97 dacsang97 commented Apr 23, 2018

I added external plugin config for Vuepress base on options variable.
Plugin system can use the local plugin or plugin package in NPM.
.vuepress/config.js

module.exports = {
  ...
  plugins: [
    // Use local plugin. Example: `localPlugin.js` in `.vuepress`
    './localPlugin.js',
    {
      // Use plugin from npm.
      resolve: 'vuepress-plugin-rss',
      // Plugin option
      options: {
        base_url: '/', // required
        site_url: 'https://coralo.io', // required
        copyright: '2018 Coralo' // optional
      }
    }
  ]
}

I just public vuepress-plugin-rss package for generating rss.xml for site using Vuepress site.

@mdaffin
Copy link
Contributor

mdaffin commented Apr 23, 2018

Similar to and will probably conflict with #196 - we really need to discuss how we want plugin support to work in vuepress. You should add your thoughts to #198.

@ycmjason
Copy link
Contributor

ycmjason commented Apr 23, 2018

I think regarding plugins, it would be really cool if vuepress could detect plugins itself. Similar to how parcel does it. Maybe as soon as a vuepress-plugin-* is installed in package.json, then load it automatically.

I am not a big fan of configuration hell.

@dacsang97
Copy link
Author

dacsang97 commented Apr 23, 2018

Oh, I had seen your work @mdaffin, this is an awesome idea. I think my pull request as the extension of your work, because of I config for both local and remote plugin, so we can public our plugins for the community and reuse them, instead of just using local plugin config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Question or discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants