Skip to content

Open config to custom themes #662

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
zlliang opened this issue Jul 21, 2018 · 1 comment
Closed

Open config to custom themes #662

zlliang opened this issue Jul 21, 2018 · 1 comment
Labels
type: feature request Request to add a new feature version: next Planned to do or already included in the next(1.0.0) version

Comments

@zlliang
Copy link

zlliang commented Jul 21, 2018

Feature request

What problem does this feature solve?

When developing a custom theme, I found it difficult (or impossible) to configure VuePress within the custom theme. For example, to add a plugin to markdown-it for my custom theme, instead of giving a default configuration to my theme, I have to edit .vuepress/config.js. It seems losing user-friendliness. I hope future versions support configuration within custom themes.

enhanceApp.js may achieve something, but seems not really straightforward...

What does the proposed API look like?

It's good if there would be a config file in theme repository (maybe .vuepress/theme/themeConfig.js), and settings in this file can effect or override site configuration in a way.

How should this be implemented in your opinion?

Check both site configuration and theme configuration. Priority can be: site (user) config > theme config.

Are you willing to work on this yourself?**

Yes, but I'm afraid if I have the capability 😅.

@vuejs vuejs deleted a comment from meteorlxy Jul 26, 2018
@ulivz
Copy link
Member

ulivz commented Jul 26, 2018

The theme API will be done as a plugin.

@ulivz ulivz added the TBD label Jul 26, 2018
@vuejs vuejs deleted a comment from meteorlxy Aug 1, 2018
@ulivz ulivz added version: next Planned to do or already included in the next(1.0.0) version type: feature request Request to add a new feature and removed TBD labels Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature version: next Planned to do or already included in the next(1.0.0) version
Projects
None yet
Development

No branches or pull requests

2 participants