Skip to content

Commit

Permalink
fix vitepress build
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel.terletzkiy committed Jul 28, 2023
1 parent f6516c1 commit 8fb7a29
Show file tree
Hide file tree
Showing 16 changed files with 1,604 additions and 512 deletions.
27 changes: 18 additions & 9 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import { defineConfig } from 'vitepress'
import {defineConfig} from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Vuelize",
description: "Realize the Impossible",
themeConfig: {
logo: "/logo.svg"
},
markdown: {
config: (md) => {
title: "Vuelize",
description: "Realize the Impossible",
themeConfig: {
logo: "/logo.svg"
},
vite: {
ssr: {
noExternal: [
"vue3-unicons",
"@morev/vue-transitions",
"lodash"
]
}
},
markdown: {
config: (md) => {

}
}
}
})
74 changes: 38 additions & 36 deletions docs/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {computed} from "vue";
import DDivider from "../../../src/components/divider/DDivider.vue";
// https://vitepress.dev/reference/runtime-api#usedata
const {site,page} = useData()
const {site, page} = useData()
const {themeConfig} = site.value;
const route = useRoute();
Expand All @@ -30,41 +30,43 @@ const repo = computed(() => repository)
</script>

<template>
<d-root>
<template v-slot:toolbar>
<d-toolbar>
<d-row height="50px" :wrap="false" link="/" glow width="max-content" class="pl-2">
<d-image class="logo" :src="themeConfig.logo" height="calc(100% - 10px)" rounded="none"/>
<d-column height="50px" :wrap="false">
<d-card-title class="font-size-medium pt-0">{{ site.title }}</d-card-title>
<d-card-subtitle class="pb-0">{{ site.description }}</d-card-subtitle>
</d-column>
</d-row>
<d-divider vertical block class="my-3 mx-2"/>
<d-spacer/>
<d-divider vertical block class="my-3 mx-2"/>
<d-button :link="repo.url" glow :color="ThemeColorProperty.warning" target="_blank">
<template v-slot:prefix>
<d-icon name="github"/>
</template>
Github
</d-button>
</d-toolbar>
</template>
<template v-slot:navbar>
<d-navigation-bar permanent>
<d-list>
<d-list-item link="/markdown-examples.html">
Markdown Examples
</d-list-item>
<d-list-item link="/api-examples.html">
API Examples
</d-list-item>
</d-list>
</d-navigation-bar>
</template>
<Content/>
</d-root>
<ClientOnly>
<d-root>
<template v-slot:toolbar>
<d-toolbar>
<d-row height="50px" :wrap="false" link="/" glow width="max-content" class="pl-2">
<d-image class="logo" :src="themeConfig.logo.toString()" height="calc(100% - 10px)" rounded="none"/>
<d-column height="50px" :wrap="false">
<d-card-title class="font-size-medium pt-0">{{ site.title }}</d-card-title>
<d-card-subtitle class="pb-0">{{ site.description }}</d-card-subtitle>
</d-column>
</d-row>
<d-divider vertical block class="my-3 mx-2"/>
<d-spacer/>
<d-divider vertical block class="my-3 mx-2"/>
<d-button :link="repo.url" glow :color="ThemeColorProperty.warning" target="_blank">
<template v-slot:prefix>
<d-icon name="github"/>
</template>
Github
</d-button>
</d-toolbar>
</template>
<template v-slot:navbar>
<d-navigation-bar permanent>
<d-list>
<d-list-item link="/markdown-examples.html">
Markdown Examples
</d-list-item>
<d-list-item link="/api-examples.html">
API Examples
</d-list-item>
</d-list>
</d-navigation-bar>
</template>
<Content/>
</d-root>
</ClientOnly>
</template>

<style scoped lang="scss">
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const appName = computed(() => name);
{{ appName }}
</d-card-title>
<d-row justify="center">
<d-image :src="themeConfig.logo" width="40vw" height="100%" rounded="none"/>
<d-image :src="themeConfig.logo.toString()" width="30vw" height="100%" rounded="none"/>
</d-row>
</d-column>
</template>
Expand Down
Loading

0 comments on commit 8fb7a29

Please sign in to comment.