From a3b8c97bc3f2b6e7d3bcfea4a8908c797c32cf0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Dec 2025 02:43:11 +0000 Subject: [PATCH] feat: add HIDE_DESCRIPTION env variable to control TG description visibility Co-authored-by: miantiao-me <2959393+miantiao-me@users.noreply.github.com> --- .env.example | 1 + src/components/header.astro | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 02ef507..7c3277a 100644 --- a/.env.example +++ b/.env.example @@ -16,6 +16,7 @@ HEADER_INJECT=HEADER_INJECT NO_FOLLOW=false NO_INDEX=false +HIDE_DESCRIPTION=false TELEGRAM_HOST=telegram.dog STATIC_PROXY="" diff --git a/src/components/header.astro b/src/components/header.astro index e18b224..88c4e83 100644 --- a/src/components/header.astro +++ b/src/components/header.astro @@ -22,6 +22,7 @@ const MASTODON = getEnv(import.meta.env, Astro, 'MASTODON') const BLUESKY = getEnv(import.meta.env, Astro, 'BLUESKY') const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/' +const hideDescription = getEnv(import.meta.env, Astro, 'HIDE_DESCRIPTION') --- { - channel?.descriptionHTML && channel?.descriptionHTML.length > 0 && ( + !hideDescription && channel?.descriptionHTML && channel?.descriptionHTML.length > 0 && (
) }