# gdb **Repository Path**: mfuu/gdb ## Basic Information - **Project Name**: gdb - **Description**: Build your blog with github discussion - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-12-26 - **Last Updated**: 2025-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gdb ![Typescript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white) ![mdx](https://img.shields.io/badge/mdx-yellow?style=for-the-badge&logo=MDX&logoColor=white) ![giscus](https://img.shields.io/badge/giscus-%2319c37d?style=for-the-badge&logo=giscus&logoColor=white) ## What is gdb gdb(github discussion blog), host blog content on GitHub, using GitHub Discussions as CMS for our Markdown content and then eventually using GitHub API to retrieve the content. ## GitHub Discussion ### Setup - Enabled discussion feature in my repository. - Deleted all default labels. - Deleted all default categories and sections. - Created new section named “Articles”. - Created new category with type “Announcement”, named “Release” respective to release posts. > You can adjust the section and categories yourself. ### Script For the fetching part extra build step for Astro, and here’s how it goes: ```json "scripts": { "fetch": "node scripts/fetch-discussions.mjs", }, ``` **Usage** ```shell npm run fetch --repository "${{github.repository}}" # for example: npm run fetch --repository "mfuu/gdb" ``` ## Config Change your website config in `src/config.ts` ```ts export default { site: '', // your website url base: '', // your website base path author: '', description: '', // your website description title: '', // your website title ogImage: 'og.png', // your website og image lightAndDarkMode: true, // enable light and dark mode showArchives: true, // show archives page postPageSize: 4, // post per page size dynamicOgImage: true, dir: 'ltr', // "rtl" | "auto" lang: 'en', // html lang code. Set this empty and default will be "en" timezone: 'Asia/Shanghai', // Default global timezone (IANA format) https://en.wikipedia.org/wiki/List_of_tz_database_time_zones socials: [], // social links shareLinks: [], // post share links }; ``` ## Giscus By default, giscus is enabled. If necessary, please modify the `src/config` configuration yourself. ```ts giscus: { enable: true, repo: '', mapping: 'number', emitMetadata: 0, inputPosition: 'bottom', reactionsEnabled: 1, lang: 'zh-CN', loading: 'lazy', lightTheme: 'light', darkTheme: 'dark', } ``` Please ensure that your repo has [installed](https://github.com/apps/giscus) the [Giscus](https://giscus.app/) App. ## Deploy Automatic synchronization with Gitubb Wokflow, detail in `.github/workflows/deploy.yml`. If you have adjusted the category name of the Discussion, please modify the env variable too. ## Others My blog theme source: [AstroPaper](https://github.com/satnaing/astro-paper). Of course you can freely adjust it to the theme you want.