dep updates
sidebar update code camp content about page
This commit is contained in:
parent
50c7e14d1f
commit
1c7c76c445
11 changed files with 121 additions and 18 deletions
13
docs/.vitepress/theme/components/CustomBlockquote.vue
Normal file
13
docs/.vitepress/theme/components/CustomBlockquote.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<blockquote>
|
||||
<slot>YELLO</slot>
|
||||
</blockquote>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CustomBlockquote"
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
|
@ -13,3 +13,8 @@ a:hover {
|
|||
.prev-next a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.VPPage {
|
||||
max-inline-size: 70ch;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
import DefaultTheme from "vitepress/theme";
|
||||
import PageLayout from "./layouts/PageLayout.vue";
|
||||
import "./custom.css";
|
||||
|
||||
export default DefaultTheme;
|
||||
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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
18
docs/.vitepress/theme/layouts/PageLayout.vue
Normal file
18
docs/.vitepress/theme/layouts/PageLayout.vue
Normal file
|
@ -0,0 +1,18 @@
|
|||
<script setup>
|
||||
import DefaultTheme from "vitepress/theme";
|
||||
const { Layout } = DefaultTheme;
|
||||
|
||||
import { useData } from "vitepress";
|
||||
const { page } = useData();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Layout>
|
||||
<main role="main">
|
||||
<h1>{{ page.title }}</h1>
|
||||
<slot name="content" />
|
||||
</main>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
Loading…
Add table
Add a link
Reference in a new issue