mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-05-13 15:09:12 +00:00
Merge pull request #123 from miantiao-me/copilot/add-env-variable-tg-intro
feat: add HIDE_DESCRIPTION env variable to control TG description visibility
This commit is contained in:
@@ -16,6 +16,7 @@ HEADER_INJECT=HEADER_INJECT
|
||||
|
||||
NO_FOLLOW=false
|
||||
NO_INDEX=false
|
||||
HIDE_DESCRIPTION=false
|
||||
|
||||
TELEGRAM_HOST=telegram.dog
|
||||
STATIC_PROXY=""
|
||||
|
||||
@@ -110,6 +110,9 @@ HEADER_INJECT=HEADER_INJECT
|
||||
NO_FOLLOW=false
|
||||
NO_INDEX=false
|
||||
|
||||
## Hide Telegram channel description
|
||||
HIDE_DESCRIPTION=false
|
||||
|
||||
## Sentry configuration options, collect server-side errors
|
||||
SENTRY_AUTH_TOKEN=SENTRY_AUTH_TOKEN
|
||||
SENTRY_DSN=SENTRY_DSN
|
||||
|
||||
@@ -108,6 +108,9 @@ HEADER_INJECT=HEADER_INJECT
|
||||
NO_FOLLOW=false
|
||||
NO_INDEX=false
|
||||
|
||||
## 隐藏 Telegram 频道简介
|
||||
HIDE_DESCRIPTION=false
|
||||
|
||||
## Sentry 配置项,收集服务端报错
|
||||
SENTRY_AUTH_TOKEN=SENTRY_AUTH_TOKEN
|
||||
SENTRY_DSN=SENTRY_DSN
|
||||
|
||||
@@ -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')
|
||||
---
|
||||
|
||||
<div id="header">
|
||||
@@ -102,7 +103,7 @@ const staticProxy = getEnv(import.meta.env, Astro, 'STATIC_PROXY') ?? '/static/'
|
||||
</div>
|
||||
|
||||
{
|
||||
channel?.descriptionHTML && channel?.descriptionHTML.length > 0 && (
|
||||
hideDescription !== 'true' && channel?.descriptionHTML && channel?.descriptionHTML.length > 0 && (
|
||||
<div class="text-box" id="site-intro" set:html={channel?.descriptionHTML} />
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user