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

22 lines
477 B
JavaScript

import DefaultTheme from "vitepress/theme";
import PageLayout from "./layouts/PageLayout.vue";
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);
});
}
};