From ee1d37a4c774361a0ebba8372e1afdb7e2439600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E5=9D=82=E9=9B=85?= <23130178+ShadowRZ@users.noreply.github.com> Date: Fri, 26 Jan 2024 20:36:11 +0800 Subject: [PATCH] Move to my scaffold --- app.config.ts | 9 +++++ app.vue | 54 ------------------------- components/Footer.vue | 18 --------- components/Header.vue | 36 ----------------- components/ScrollToTop.vue | 31 --------------- components/TOCContainer.vue | 16 -------- components/ThemeToggle.vue | 58 --------------------------- components/WithUnderline.vue | 18 --------- components/content/ProseH1.vue | 27 ------------- components/content/ProseH2.vue | 27 ------------- components/content/ProseH3.vue | 27 ------------- components/content/ProseH4.vue | 27 ------------- components/content/ProseH5.vue | 27 ------------- components/content/ProseH6.vue | 27 ------------- content/index.md | 0 content/index.yml | 10 +++++ content/posts/_dir.yml | 2 +- layouts/default.vue | 5 --- layouts/posts.vue | 50 ----------------------- nuxt.config.ts | 14 +------ pages/index.vue | 73 ---------------------------------- uno.config.ts | 9 ++++- 22 files changed, 30 insertions(+), 535 deletions(-) create mode 100644 app.config.ts delete mode 100644 app.vue delete mode 100644 components/Footer.vue delete mode 100644 components/Header.vue delete mode 100644 components/ScrollToTop.vue delete mode 100644 components/TOCContainer.vue delete mode 100644 components/ThemeToggle.vue delete mode 100644 components/WithUnderline.vue delete mode 100644 components/content/ProseH1.vue delete mode 100644 components/content/ProseH2.vue delete mode 100644 components/content/ProseH3.vue delete mode 100644 components/content/ProseH4.vue delete mode 100644 components/content/ProseH5.vue delete mode 100644 components/content/ProseH6.vue delete mode 100644 content/index.md create mode 100644 content/index.yml delete mode 100644 layouts/default.vue delete mode 100644 layouts/posts.vue delete mode 100644 pages/index.vue diff --git a/app.config.ts b/app.config.ts new file mode 100644 index 0000000..0dbc25a --- /dev/null +++ b/app.config.ts @@ -0,0 +1,9 @@ +export default defineAppConfig({ + bitfield: { + baseURL: 'https://shadowrz.github.io/blog/', + title: '@ShadowRZ\'s Blog', + description: 'Where something happens.', + copyright: (date: Date) => `© 2021-${date.getFullYear()} Yorusaka Miyabi`, + generator: true + } +}) diff --git a/app.vue b/app.vue deleted file mode 100644 index bee66f5..0000000 --- a/app.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - diff --git a/components/Footer.vue b/components/Footer.vue deleted file mode 100644 index d9776ef..0000000 --- a/components/Footer.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/components/Header.vue b/components/Header.vue deleted file mode 100644 index ee8afc2..0000000 --- a/components/Header.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - Home - - - - - - - diff --git a/components/ScrollToTop.vue b/components/ScrollToTop.vue deleted file mode 100644 index c4ced89..0000000 --- a/components/ScrollToTop.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Scroll to Top - - diff --git a/components/TOCContainer.vue b/components/TOCContainer.vue deleted file mode 100644 index f80fcff..0000000 --- a/components/TOCContainer.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - diff --git a/components/ThemeToggle.vue b/components/ThemeToggle.vue deleted file mode 100644 index b81c939..0000000 --- a/components/ThemeToggle.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - {{ color.title }} - - - - diff --git a/components/WithUnderline.vue b/components/WithUnderline.vue deleted file mode 100644 index 129a152..0000000 --- a/components/WithUnderline.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/components/content/ProseH1.vue b/components/content/ProseH1.vue deleted file mode 100644 index b091bbf..0000000 --- a/components/content/ProseH1.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/components/content/ProseH2.vue b/components/content/ProseH2.vue deleted file mode 100644 index a1ab2c0..0000000 --- a/components/content/ProseH2.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/components/content/ProseH3.vue b/components/content/ProseH3.vue deleted file mode 100644 index cb537bf..0000000 --- a/components/content/ProseH3.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/components/content/ProseH4.vue b/components/content/ProseH4.vue deleted file mode 100644 index 7640a9c..0000000 --- a/components/content/ProseH4.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/components/content/ProseH5.vue b/components/content/ProseH5.vue deleted file mode 100644 index 8739b9f..0000000 --- a/components/content/ProseH5.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/components/content/ProseH6.vue b/components/content/ProseH6.vue deleted file mode 100644 index 2b22bfb..0000000 --- a/components/content/ProseH6.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/content/index.md b/content/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/content/index.yml b/content/index.yml new file mode 100644 index 0000000..4a720a8 --- /dev/null +++ b/content/index.yml @@ -0,0 +1,10 @@ +title: "@ShadowRZ's Blog" +description: "Where something happens." +layout: listing +metas: true +query: + path: "/posts" + sort: + - date: -1 + where: + - _partial: false diff --git a/content/posts/_dir.yml b/content/posts/_dir.yml index 68c1a51..5066081 100644 --- a/content/posts/_dir.yml +++ b/content/posts/_dir.yml @@ -1 +1 @@ -layout: posts +layout: post diff --git a/layouts/default.vue b/layouts/default.vue deleted file mode 100644 index bac28bd..0000000 --- a/layouts/default.vue +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/layouts/posts.vue b/layouts/posts.vue deleted file mode 100644 index 0c2b5c7..0000000 --- a/layouts/posts.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - Publish Date: - {{ - page.date ? new Date(page.date).toDateString() : '(Working)' - }} - - - - - Category: - - {{ category }} - - - - - - - Tag: - - {{ tag }} - - - - - - {{ page.title }} - - - - - - - - - diff --git a/nuxt.config.ts b/nuxt.config.ts index b74d9c2..7af65f5 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,5 +1,6 @@ // https://nuxt.com/docs/guide/directory-structure/nuxt.config#nuxt-config-file export default defineNuxtConfig({ + extends: ['github:ShadowRZ/bitfield-scaffold'], app: { baseURL: '/blog/', head: { @@ -38,12 +39,7 @@ export default defineNuxtConfig({ }, devtools: { enabled: true }, modules: [ - "@nuxt/content", - '@nuxt/image', - "@nuxtjs/color-mode", - "@vueuse/nuxt", - "@unocss/nuxt", - "nuxt-icon" + '@nuxt/image' ], colorMode: { classSuffix: '' @@ -52,11 +48,5 @@ export default defineNuxtConfig({ prerender: { autoSubfolderIndex: false // XXX } - }, - content: { - documentDriven: true, - highlight: { - theme: 'nord' - } } }) diff --git a/pages/index.vue b/pages/index.vue deleted file mode 100644 index fe51568..0000000 --- a/pages/index.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - @ShadowRZ's Blog - Where something happens. - - - - - - - - Publish Date: - {{ - page.date ? new Date(page.date).toDateString() : '(Working)' - }} - - - - - Category: - - {{ category }} - - - - - - - Tag: - - {{ tag }} - - - - - {{ page.title }} - {{ page.description }} - - - - diff --git a/uno.config.ts b/uno.config.ts index 05ab36b..c1a2760 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -5,6 +5,7 @@ import { presetUno, presetWebFonts, } from 'unocss' +import transformerDirectives from '@unocss/transformer-directives' export default defineConfig({ presets: [ @@ -17,7 +18,10 @@ export default defineConfig({ 'blockquote': { 'border-left': '4px', 'border-style': 'dashed' - } + }, + ':not(pre) > code::before,:not(pre) > code::after': { + content: 'none' + }, } }), presetWebFonts({ @@ -34,4 +38,7 @@ export default defineConfig({ ['bg-underline-start', { 'background-position': '100% 100%'}], ['bg-underline-end', { 'background-position': '0% 100%'}] ], + transformers: [ + transformerDirectives(), + ], })
Where something happens.
{{ page.description }}