Skip to content

miantiao-me/BroadcastChannel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

229 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BroadcastChannel

Turn your Telegram Channel into a MicroBlog.


English | 简体中文

✨ Features

  • Turn your Telegram Channel into a MicroBlog
  • SEO friendly /sitemap.xml
  • 0 JS on the browser side
  • RSS and RSS JSON /rss.xml /rss.json

🪧 Demo

Real users

Platform

  1. Cloudflare Workers
  2. Netlify
  3. Vercel

BroadcastChannel supports deployment on serverless platforms like Cloudflare Workers, Netlify, Vercel that support SSR, or on a VPS. Cloudflare Pages SSR is not supported with Astro 6 + @astrojs/cloudflare v13; use Workers for Cloudflare deployments. For detailed tutorials, see Deploy your Astro site.

🧱 Tech Stack

🏗️ Deployment

Docker

  1. docker pull ghcr.io/miantiao-me/broadcastchannel:main
  2. docker run -d --name broadcastchannel -p 4321:4321 -e CHANNEL=miantiao_me ghcr.io/miantiao-me/broadcastchannel:main

Serverless

  1. Fork this project to your GitHub
  2. Create a project on Cloudflare Workers/Netlify/Vercel
  3. Select the BroadcastChannel project and the Astro framework
  4. Configure the environment variable CHANNEL with your channel name. This is the minimal configuration, for more configurations see the options below
  5. Save and deploy
  6. Bind a domain (optional).
  7. Update code, refer to the official GitHub documentation Syncing a fork branch from the web UI.

Cloudflare Workers minimal commands:

pnpm exec wrangler login
SERVER_ADAPTER=cloudflare_workers pnpm build
pnpm exec wrangler deploy

Configure CHANNEL and other runtime values in the Workers dashboard or with pnpm exec wrangler secret put CHANNEL. Cloudflare Pages SSR is not supported with Astro 6 + @astrojs/cloudflare v13. Migrate Pages deployments to Workers.

⚒️ Configuration

## Telegram Channel Username, must be configured. The string of characters following t.me/
CHANNEL=miantiao_me

## Language and timezone settings. Use an Intl/BCP 47 locale, for example en or zh-CN
LOCALE=en
TIMEZONE=America/New_York

## Social media usernames
TELEGRAM=miantiao-me
TWITTER=miantiao-me
GITHUB=miantiao-me
MASTODON=mastodon.social/@Mastodon
BLUESKY=bsky.app

## The following two social media need to be URLs
DISCORD=https://DISCORD.com
PODCAST=https://PODCAST.com

## Header and footer code injection, supports HTML
FOOTER_INJECT=
HEADER_INJECT=

## SEO configuration options, can prevent search engines from indexing content
NOFOLLOW=false
NOINDEX=false

## Hide Telegram channel description
HIDE_DESCRIPTION=false

## Telegram host name and static resource proxy, not recommended to modify
TELEGRAM_HOST=telegram.dog
STATIC_PROXY=

## Enable Google Site Search
GOOGLE_SEARCH_SITE=memo.miantiao.me

## Enable tags page, separate tags with commas
TAGS=tag1,tag2,tag3

## Show comments
COMMENTS=true

## Show reactions
REACTIONS=true

## List of links in the Links page, Separate using commas and semicolons
LINKS=Title1,URL1;Title2,URL3;Title3,URL3;

## Sidebar Navigation Item, Separate using commas and semicolons
NAVS=Title1,URL1;Title2,URL3;Title3,URL3;

## Enable RSS beautify
RSS_BEAUTIFY=true

🙋🏻 FAQs

  1. Why is the content empty after deployment?
    • Check if the channel is public, it must be public
    • The channel username is a string, not a number
    • Turn off the "Restricting Saving Content" setting in the channel
    • Redeploy after modifying environment variables
    • Telegram blocks public display of some sensitive channels, you can verify by visiting https://t.me/s/channelusername.

☕ Sponsor

  1. Follow me on Telegram
  2. Follow me on 𝕏
  3. Sponsor me on GitHub

About

Turn your Telegram Channel into a MicroBlog.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors