From 42ea2de3bd44fd77cf26fb1e08075d3bd3ecc594 Mon Sep 17 00:00:00 2001 From: gbanyan Date: Tue, 18 Nov 2025 00:18:15 +0800 Subject: [PATCH] Add env-based short about text under sidebar avatar and remove 'about site' card --- .env.local.example | 1 + components/right-sidebar.tsx | 14 +++++--------- lib/config.ts | 3 +++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.env.local.example b/.env.local.example index edf500f..0c8e741 100644 --- a/.env.local.example +++ b/.env.local.example @@ -11,6 +11,7 @@ NEXT_PUBLIC_SITE_TAGLINE="Short tagline for your blog." NEXT_PUBLIC_POSTS_PER_PAGE="5" NEXT_PUBLIC_DEFAULT_LOCALE="zh-TW" NEXT_PUBLIC_SITE_AVATAR_URL="https://www.gravatar.com/avatar/yourhash?s=160&d=identicon" +NEXT_PUBLIC_SITE_ABOUT_SHORT="A short sentence about you." # Color scheme / accents NEXT_PUBLIC_COLOR_ACCENT="#2563eb" diff --git a/components/right-sidebar.tsx b/components/right-sidebar.tsx index ed5bbc4..da03413 100644 --- a/components/right-sidebar.tsx +++ b/components/right-sidebar.tsx @@ -74,18 +74,14 @@ export function RightSidebar() { ))} )} + {siteConfig.aboutShort && ( +

+ {siteConfig.aboutShort} +

+ )} -
-

- 關於本站 -

-

- {siteConfig.description} -

-
- {tags.length > 0 && (

diff --git a/lib/config.ts b/lib/config.ts index ada0ed6..a1c97d5 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -15,6 +15,9 @@ export const siteConfig = { : 5, defaultLocale: process.env.NEXT_PUBLIC_DEFAULT_LOCALE || 'zh-TW', avatar: process.env.NEXT_PUBLIC_SITE_AVATAR_URL || '', + aboutShort: + process.env.NEXT_PUBLIC_SITE_ABOUT_SHORT || + '醫師,喜歡寫作與技術分享。', social: { twitter: process.env.NEXT_PUBLIC_TWITTER_HANDLE || '', github: process.env.NEXT_PUBLIC_GITHUB_URL || '',