diff --git a/demo/.vitepress/config.ts b/demo/.vitepress/config.ts index a3011ab..fc26831 100644 --- a/demo/.vitepress/config.ts +++ b/demo/.vitepress/config.ts @@ -19,6 +19,7 @@ export default defineConfig({ }, titleTemplate: ':title | Async', themeConfig: { + globalComponents: ['TrmDividerTitle'], topBars: [ { title: 'Home', url: '/' }, { @@ -109,5 +110,11 @@ export default defineConfig({ tags: '/tags', categorys: '/categories', }, + noticeOutdate: { + enable: true, + limitDay: 1, + style: 'flat', + position: 'bottom', + }, }, }); diff --git a/demo/.vitepress/theme/index.ts b/demo/.vitepress/theme/index.ts index f02feba..8be6b31 100644 --- a/demo/.vitepress/theme/index.ts +++ b/demo/.vitepress/theme/index.ts @@ -4,8 +4,10 @@ // }; import { defineTheme } from 'vitepress-theme-async'; +import layout from './layout.vue'; export default defineTheme({ + Layout: layout, enhanceApp(_ctx) { // }, diff --git a/demo/.vitepress/theme/layout.vue b/demo/.vitepress/theme/layout.vue new file mode 100644 index 0000000..f1385c9 --- /dev/null +++ b/demo/.vitepress/theme/layout.vue @@ -0,0 +1,11 @@ + + diff --git a/packages/vitepress-theme-async/components/TrmPageAbout.vue b/packages/vitepress-theme-async/components/TrmPageAbout.vue index 04ef5c9..48febe5 100644 --- a/packages/vitepress-theme-async/components/TrmPageAbout.vue +++ b/packages/vitepress-theme-async/components/TrmPageAbout.vue @@ -1,6 +1,6 @@ diff --git a/packages/vitepress-theme-async/components/TrmPageArchive.vue b/packages/vitepress-theme-async/components/TrmPageArchive.vue index e7da743..2cc4b81 100644 --- a/packages/vitepress-theme-async/components/TrmPageArchive.vue +++ b/packages/vitepress-theme-async/components/TrmPageArchive.vue @@ -2,9 +2,9 @@ import { computed, onMounted, ref } from "vue"; import { useTags, useArchives, useCategories, useAllPosts, useTheme } from "../composables"; +import TrmTimeline from "./global/TrmTimeline.vue"; +import TrmDividerTitle from "./global/TrmDividerTitle.vue"; import TrmPagination from "./TrmPagination.vue"; -import TrmTimeLine from "./TrmTimeline.vue"; -import TrmDividerTitle from "./TrmDividerTitle.vue"; import { formatDate } from "../utils/client"; import { useCurrentPageIndex } from "../blog"; @@ -80,7 +80,7 @@ onMounted(() => {
- +
diff --git a/packages/vitepress-theme-async/components/TrmPageIndex.vue b/packages/vitepress-theme-async/components/TrmPageIndex.vue index 42caa07..3be197e 100644 --- a/packages/vitepress-theme-async/components/TrmPageIndex.vue +++ b/packages/vitepress-theme-async/components/TrmPageIndex.vue @@ -1,17 +1,20 @@ @@ -38,17 +39,7 @@ const theme = useTheme(); diff --git a/packages/vitepress-theme-async/components/TrmPagePost.vue b/packages/vitepress-theme-async/components/TrmPagePost.vue index 0b3ca61..fa07952 100644 --- a/packages/vitepress-theme-async/components/TrmPagePost.vue +++ b/packages/vitepress-theme-async/components/TrmPagePost.vue @@ -1,10 +1,10 @@