Closed
Description
Vue Press version: 0.8.4
In .vuepress/
components are automatically registered when they're placed in components/
. As a developer, my assumption was that the theme/
folder would have a similar feature.
Components can be registered with a pattern like this:
//.vuepress/theme/enhanceApp.js
import PostList from './components/PostList'
import PostSnippet from './components/PostSnippet'
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData // site metadata
}) => {
Vue.component('PostList', PostList)
Vue.component('PostSnippet', PostSnippet)
}
But it would be nice if the theme could mirror functionality of .vuepress/
structures like components/