It's a simple Telegram bot to read messages and update a Jekyll blog.
repo
scope.TELEGRAM_TOKEN
: The token of your botCHAT_ID
: A chat id that the bot should listen to. It can be a group, channel or a direct chat.DEBUG_CHAT_ID
: A chat id to send debug messages (For example, you can get all errors in your private chat)GITHUB_TOKEN
: The token to access the Github API.GITHUB_REPO_NAME
: The name of the repository with the format username/repo
.POST_PATH
: The target path to create the new post. For Jekyll blogs, it is _posts
.[!TIP] You can use
TELEGRAM_BASE_URL
environment variable to change the base URL of the Telegram API.
docker run -d --name jekyll-telegram-bot \
-e TELEGRAM_TOKEN=your-telegram-token \
-e CHAT_ID=your-chat-id \
-e DEBUG_CHAT_ID=your-chat-id \
-e GITHUB_TOKEN=your-github-token \
-e GITHUB_REPO_NAME=your-username/your-repo \
-e POST_PATH=_posts \
hatamiarash7/tg-blog-updater:v1.0.1
There is a default format to create a new post. The bot will parse the message and create a new post using the following format:
title
===
tags ( comma separated )
===
content
For example:
Hello world
===
jekyll,telegram,blog
===
This is the content of the post
[!NOTE] You should change the code if you want to use a different format.
Don't be shy and reach out to us if you want to contribute 😉
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Each project may have many problems. Contributing to the better development of this project by reporting them. 👍