-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
type: feature requestRequest to add a new featureRequest to add a new featureversion: nextPlanned to do or already included in the next(1.0.0) versionPlanned to do or already included in the next(1.0.0) version
Description
Feature request
What problem does this feature solve?
markdown.config
currently requires a javascript function argument. This is only manageable with a config.js
setup. I would like to allow markdown plugin loading also from a config.yml
file.
Similar requests, see #326 & #579
What does the proposed API look like?
I would propose a markdown.plugins
endpoint that requires an Array. See implementation example.
How should this be implemented in your opinion?
# .vuepress/config.yml
markdown:
lineNumbers: true
plugins:
- ins
- markdown-it-mark
// .vuepress/config.js
module.exports = {
markdown: {
lineNumbers: true,
plugins: ['ins', 'markdown-it-mark']
}
}
// vuepress/lib/markdown/index.js:58
// apply user plugins
if (markdown.plugins) {
markdown.plugins.forEach(function (plugin) {
plugin = plugin.replace('markdown-it-', '')
md.use(require(`markdown-it-${plugin}`))
})
}
Are you willing to work on this yourself?
Yes 🎉 wip branch is alive
Metadata
Metadata
Assignees
Labels
type: feature requestRequest to add a new featureRequest to add a new featureversion: nextPlanned to do or already included in the next(1.0.0) versionPlanned to do or already included in the next(1.0.0) version