Template to create your own site from Telegram channel.
Demo: davidshekunts.ru
This project is OpenSource version of teleblog.net and it maintained by me AND you, so be kind and suggest things, lets build together.
- Go
- Pocketbase
- Templ
- Vue
- Tailwind
- daisyUI
This project is NOT about best practices. It's about making product and do it efficiently. I haven't been working with Vue for a long time, and this is first time for me to use Pocketbase, Templ.
Don't take this project as a reference for best practices.
cmd/teleblog- Teleblog platforminfra- some infrastructure code (nginx, systemctl)libs- libraries
- Install Go & Node.js
- Run
make setup - Install node deps (
npm installoryarn installorpnpm install)
- Run
cd cmd/teleblog && cp app.env.example app.envand fill it - Run
make dev
- From sources
- Make sure you have Go installed, GOBIN and PATH configured on server
- Clone repository
git clone git@github.com:Dionid/teleblog.git - Install dependencies (live in section above)
- Run
make serve
- Go install
- Make sure you have Go installed, GOBIN and PATH configured on server
- Run
go install github.com/Dionid/teleblog/cmd/teleblog@lateston server - Run
teleblog serve --http=127.0.0.1:8091
- Create bot in @BotFather
- Go to
SITE_URL:8090/_to see Pocketbase admin panel and fill in your admin - Create user in
usertable (usernamewill be enough) - Verify in bot to start parsing your channel
- Create
tg_verification_token(be sure that column "verified" is false) - Send this token to your bot
/verifytoken YOUR_TOKEN(this will addtg_id,tg_userandverifiedto your user) - Add bot to public TG channels and their groups
- Send group links to your bot
/addchannel YOUR_CHANNEL_LINK
- Create
- Fill logo, seo and description data in
configtable - Add menu items in
menu_itemtable - Change any template as you need in
cmd/teleblog/httpapi - Add any public assets to
cmd/teleblog/httpapi/public
- Export JSON history from your channel and zip it with files
- Via UI
- Go to
/_/upload-historyand upload file to it
- Go to
- Via terminal
- Paste it to
cmd/teleblogfolder - Run
cd cmd/teleblog && go run . upload-history FILE_NAME.zip
- Paste it to
- !ATTENTION! Upload channels posts firstly and linked chats comments secondly
Goal: Make it so content appears, but customization through Pocketbase admin
Status: Done
Goal: Add content improvement features
Status: Done
Goal: Separate it from demo project
Status: Done
Goal: Future features
- Schema.org + Open Graph.
- Auto-translate
- Repost to Medium
- Files
- Spoilers for Audio & Circles
- Dark / Light theme changer
- Delete old tags
- Author Image (getUserProfilePhotos)
- Admin page
- Partial reload
- Sorting
- Releases
- Docker image
- H1 from any text
- Pinned messages
- Likes counter
- Album id
Every photo, video, audio, file, poll, etc. is a separate post in TG.
To merge them toghether, we use album_id field.
But there is no album_id for messages parsed from history.
So right now the only way is to assume that messages that are created in the same time are from the same album.