From 81049c31482f5f0ae0794459c436bc28d2c574c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ChangJoo=20Park=28=EB=B0=95=EC=B0=BD=EC=A3=BC=29?= Date: Wed, 14 May 2025 15:28:14 +0900 Subject: [PATCH] feat: add giscuss --- astro.config.mjs | 17 +++++++++++++++++ package-lock.json | 13 +++++++++++++ package.json | 1 + 3 files changed, 31 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index 7b3e0a1..ab4d110 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,5 +1,6 @@ import { rehypeMermaid } from "@beoe/rehype-mermaid"; import { getCache } from "@beoe/cache"; +import starlightGiscus from 'starlight-giscus' const googleAnalyticsId = 'G-FTYYK8J5MY' const cache = await getCache(); @@ -27,7 +28,11 @@ export default defineConfig({ plugins: [pluginLineNumbers()], }), starlight({ + credits: true, title: "Flutter 배우기", + customCss: [ + './src/styles/custom.css', + ], head: [ // Adding google analytics { @@ -64,6 +69,18 @@ export default defineConfig({ starlightLlmsTxt({ projectName: "Flutter 배우기", }), + starlightGiscus({ + repo: 'changjoo-park/learn-flutter', + repoId: 'R_kgDOOpJgKQ', + category: 'Q&A', + categoryId: 'DIC_kwDOOpJgKc4CqIHA', + inputPosition: 'top', + mapping: 'pathname', + reactionsEnabled: true, + emitMetadata: true, + theme: 'preferred_color_scheme', + lang: 'ko', + }) ], }), ], diff --git a/package-lock.json b/package-lock.json index ca9cee9..24052ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "playwright": "^1.52.0", "rehype-mermaid": "^3.0.0", "sharp": "^0.32.5", + "starlight-giscus": "^0.6.1", "starlight-llms-txt": "^0.5.1" } }, @@ -8096,6 +8097,18 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/starlight-giscus": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/starlight-giscus/-/starlight-giscus-0.6.1.tgz", + "integrity": "sha512-5vwNb06slZW+UwVBrva3gARYoIegr2t5sowfmQ7x5+W1eFv4VlHmIy/XJO7tvdizWlShiRGsgRcQORqrkcemLg==", + "license": "MIT", + "engines": { + "node": "^18.17.1 || ^20.3.0 || >=21.0.0" + }, + "peerDependencies": { + "@astrojs/starlight": ">=0.32.0" + } + }, "node_modules/starlight-llms-txt": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/starlight-llms-txt/-/starlight-llms-txt-0.5.1.tgz", diff --git a/package.json b/package.json index 2377b24..aa15ab7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "playwright": "^1.52.0", "rehype-mermaid": "^3.0.0", "sharp": "^0.32.5", + "starlight-giscus": "^0.6.1", "starlight-llms-txt": "^0.5.1" } }