cours/docs/.vitepress/theme/index.js

22 lines
477 B
JavaScript
Raw Permalink Normal View History

2022-07-16 12:04:51 +02:00
import DefaultTheme from "vitepress/theme";
import PageLayout from "./layouts/PageLayout.vue";
2022-07-16 12:04:51 +02:00
import "./custom.css";
const modules = import.meta.globEager("./components/**/*.vue");
const components = [];
for (const path in modules) {
components.push(modules[path].default);
}
export default {
...DefaultTheme,
// Layout: PageLayout,
enhanceApp({ app }) {
// import all components globally
components.forEach(comp => {
app.component(comp.name, comp);
});
}
};