From 5e5c646a5fd0a6c7aefd3bebd96bd30201623ab9 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 1 Jan 2024 17:04:11 -0600 Subject: [PATCH] feat: basic blog add blog interface #11 --- .vitepress/config.mts | 14 ++++++---- .vitepress/theme/CodeHiveLayout.vue | 41 ++++++++++++++++++++++++++++- en/blog.md | 12 +++++++++ en/posts/2023-in-review.md | 7 +++++ src/blog.data.ts | 28 ++++++++++++++++++++ src/formatDate.ts | 9 +++++++ 6 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 en/blog.md create mode 100644 en/posts/2023-in-review.md create mode 100644 src/blog.data.ts create mode 100644 src/formatDate.ts diff --git a/.vitepress/config.mts b/.vitepress/config.mts index a597c29..29481fc 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -22,12 +22,16 @@ export default defineConfig({ i18nRouting: true, // https://vitepress.dev/reference/default-theme-config nav: [ - { text: 'Home', link: './' }, - { text: 'About', link: './about' }, - { text: 'Contact', link: './contact' }, - { text: 'Bees', link: './bees' }, - { text: 'Privacy', link: './privacy' }, + { text: 'Home', link: '/en/' }, + { text: 'About', link: '/en/about', activeMatch: '\/.*\/about.*' }, + { text: 'Blog', link: '/en/blog', activeMatch: '\/.*\/(blog|posts).*' }, + { text: 'Contact', link: '/en/contact' }, + { text: 'Bees', link: '/en/bees' }, + { text: 'Privacy', link: '/en/privacy' }, ], + search: { + provider: 'local' + }, // sidebar: [ // { diff --git a/.vitepress/theme/CodeHiveLayout.vue b/.vitepress/theme/CodeHiveLayout.vue index a30aa7a..f4cf256 100644 --- a/.vitepress/theme/CodeHiveLayout.vue +++ b/.vitepress/theme/CodeHiveLayout.vue @@ -1,8 +1,14 @@ + +