Skip to content

Create a plugin system and a guide on how to create plugins #62

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

Closed
FadySamirSadek opened this issue Apr 16, 2018 · 5 comments
Closed

Create a plugin system and a guide on how to create plugins #62

FadySamirSadek opened this issue Apr 16, 2018 · 5 comments
Labels
type: question or discussion Question or discussion

Comments

@FadySamirSadek
Copy link
Contributor

FadySamirSadek commented Apr 16, 2018

I think Plugins are one of the most essential things in static site generators as they do a lot of functionalities that can not be implemented otherwise so I think there should be a guide explaining how to create a plugin and future plans on the plugin system

@yyx990803
Copy link
Member

yyx990803 commented Apr 16, 2018

Unlike other static site generators, almost anything can be done either in a custom theme (which is a full Vue app) or tweaking the markdown/postcss/webpack config via the markdown options or build pipeline options.

Do you have any specific use case that cannot be solved with these?

As for the default theme, it is intended to focus on documentation only for now.

@MartinMuzatko
Copy link
Contributor

MartinMuzatko commented Apr 16, 2018

It would be nice to have documented how e.g. custom containers can be added.
Right now, they are hardcoded here: https://github.com/vuejs/vuepress/tree/master/lib/markdown

I think you can add additional markdown related functions as documented here: https://vuepress.vuejs.org/config/#markdown-config
But this is not really that clear, how e.g. the existing containers can be altered, disabled or overwritten.

@yyx990803 yyx990803 added the type: question or discussion Question or discussion label Apr 16, 2018
@yyx990803
Copy link
Member

@MartinMuzatko built-in containers cannot be changed, at least I don't see a particular reason why you'd want to do that instead of adding a new container type. Containers are added with https://github.com/markdown-it/markdown-it-container

@mdaffin
Copy link
Contributor

mdaffin commented Apr 21, 2018

One problem I have had is the inability to generate flat files based on site data (redirect links, sitemap, rss feeds, other hosting provider configs). I have attempted to solve this problem in #196 which gives themes and the site a possibility to hook into the options value just before the prepare.js ends. It is not a general purpose plugin system, just gives themes and sites the ability to add a low-level hook that runs on the server side rather then client side.

@ulivz
Copy link
Member

ulivz commented Apr 25, 2018

Let's continue discussion at the roadmap "channel" (#198).

@ulivz ulivz closed this as completed Apr 25, 2018
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

No branches or pull requests

5 participants