Skip to content

Open config to custom themes #662

Closed
Closed
@zlliang

Description

@zlliang

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 😅.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature requestRequest to add a new featureversion: nextPlanned to do or already included in the next(1.0.0) version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions