mirror of
https://github.com/d0zingcat/BroadcastChannel.git
synced 2026-05-31 23:16:52 +00:00
Improved documentation clarity on configuring Telegram channel usernames, added troubleshooting section for common deployment issues, and emphasized the necessity of public channels and correct username format to ensure successful deployment.
112 lines
3.5 KiB
Markdown
112 lines
3.5 KiB
Markdown
# 广播频道
|
||
|
||
**将你的 Telegram Channel 转为微博客。**
|
||
|
||
---
|
||
|
||
[English](./README.md) | 简体中文
|
||
|
||
## ✨ 特性
|
||
|
||
- **将 Telegram Channel 转为微博客**
|
||
- **SEO 友好**
|
||
- **浏览器端 0 JS**
|
||
- **提供 RSS 和 RSS JSON**
|
||
|
||
## 🪧 演示
|
||
|
||
### 真实用户
|
||
|
||
- [面条实验室](https://memo.miantiao.me/)
|
||
- [Find Blog👁发现博客](https://broadcastchannel.pages.dev/)
|
||
- [Memos 广场 🎪](https://now.memobbs.app/)
|
||
- [APPDO 数字生活指南](https://mini.appdo.xyz/)
|
||
- [85.60×53.98卡粉订阅/提醒](https://tg.docofcard.com/)
|
||
- [新闻在花频道](https://tg.istore.app/)
|
||
- [Charles Chin's Whisper](https://memo.eallion.com/)
|
||
- [PlayStation 新闻转发](https://playstationnews.pages.dev)
|
||
- [Yu's Life](https://daily.pseudoyu.com/)
|
||
- [Leslie 和朋友们](https://tg.imlg.co/)
|
||
- [OKHK 分享](https://tg.okhk.net/)
|
||
- [gledos 的微型博客](https://microblogging.gledos.science)
|
||
- [Steve Studio](https://tgc.surgeee.me/)
|
||
- [LiFePO4:沙雕吐槽](https://lifepo4.top)
|
||
- [Hotspot Hourly](https://hourly.top/)
|
||
|
||
### 平台
|
||
|
||
1. [Cloudflare](https://broadcast-channel.pages.dev/)
|
||
2. [Netlify](https://broadcast-channel.netlify.app/)
|
||
3. [Vercel](https://broadcast-channel.vercel.app/)
|
||
|
||
广播频道支持部署在 Cloudflare、Netlify、Vercel 等支持 Node.js SSR 的无服务器平台或者 VPS。
|
||
具体教程见[部署你的 Astro 站点](https://docs.astro.build/zh-cn/guides/deploy/)。
|
||
|
||
## 🧱 技术栈
|
||
|
||
- 框架:[Astro](https://astro.build/)
|
||
- 内容管理系统:[Telegram Channels](https://telegram.org/tour/channels)
|
||
- 模板: [Sepia](https://github.com/Planetable/SiteTemplateSepia)
|
||
|
||
## 🏗️ 部署
|
||
|
||
1. [Fork](https://github.com/ccbikai/BroadcastChannel/fork) 此项目到你 GitHub
|
||
2. 在 Cloudflare/Netlify/Vercel 创建项目
|
||
3. 选择 `BroadcastChannel` 项目和 `Astro` 框架
|
||
4. 配置环境变量 `CHANNEL` 为你的频道名称。此为最小化配置,更多配置见下面的配置项
|
||
5. 保存并部署
|
||
6. 绑定域名(可选)。
|
||
7. 更新代码,参考 GitHub 官方文档 [从 Web UI 同步分叉分支](https://docs.github.com/zh/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-branch-from-the-web-ui)。
|
||
|
||
## ⚒️ 配置
|
||
|
||
```env
|
||
## Telegram 频道用户名,必须配置。 t.me/ 后面那串字符
|
||
CHANNEL=miantiao_me
|
||
|
||
## 语言和时区设置,语言选项见[dayjs](https://github.com/iamkun/dayjs/tree/dev/src/locale)
|
||
LOCALE=zh-cn
|
||
TIMEZONE=Asia/Shanghai
|
||
|
||
## 社交媒体用户名
|
||
TELEGRAM=ccbikai
|
||
TWITTER=ccbikai
|
||
GITHUB=ccbikai
|
||
|
||
## 下面两个社交媒体需要为 URL
|
||
DISCORD=https://DISCORD.com
|
||
PODCASRT=https://PODCASRT.com
|
||
|
||
## 头部尾部代码注入,支持 HTML
|
||
FOOTER_INJECT=FOOTER_INJECT
|
||
HEADER_INJECT=HEADER_INJECT
|
||
|
||
## SEO 配置项,可不让搜索引擎索引内容
|
||
NO_FOLLOW=false
|
||
NO_INDEX=false
|
||
|
||
## Sentry 配置项,收集服务端报错
|
||
SENTRY_AUTH_TOKEN=SENTRY_AUTH_TOKEN
|
||
SENTRY_DSN=SENTRY_DSN
|
||
SENTRY_PROJECT=SENTRY_PROJECT
|
||
|
||
## Telegram 主机名称和静态资源代理,不建议修改
|
||
HOST=telegram.dog
|
||
STATIC_PROXY=
|
||
```
|
||
|
||
## 常问问题
|
||
|
||
1. 为什么部署后内容为空?
|
||
- 检查频道是否是公开的,必须是公开的
|
||
- 频道用户名是字符串,不是数字
|
||
- 关闭频道 Restricting Saving Content 设置项
|
||
- 修改完环境变量后需要重新部署
|
||
- Telegram 会屏蔽一些敏感频道的公开展示, 可以通过访问 `https://t.me/s/频道用户名` 确认
|
||
|
||
## ☕ 赞助
|
||
|
||
1. [在 Telegram 关注我](https://t.me/miantiao_me)
|
||
2. [在 𝕏 上关注我](https://x.com/ccbikai)
|
||
3. [在 GitHub 赞助我](https://github.com/sponsors/ccbikai)
|