A simple Ghost webhook -> Telegram backend
Possible replacements:
%TITLE%
, %EXCERPT%
(prefer URL preview), %AUTHORS%
(comma separated), %AUTHOR%
(primary author), %TAGS%
(comma separated), %TAG%
(primary tag), %URL%
The message is processed as Telegram HTML (Telegram documentation)
Remember: <
, >
, &
and "
instead of <>&"
when not in HTML tags.
Developing is tricky, as we need a local Ghost instance to test webhooks.
Luckily I've spent a couple of hours setting up a docker-compose file that brings up a local test environment.
Unfortunately it's currently missing database seeding or a sample database.
- clone this repository
docker-compose up
- navigate to localhost:3001/ghost
- set up blog with any information
- configure webhook (ghost settings -> integrations -> custom)
- add a webhook with
event: Post published
andURL: http://vendla:willebrand@ghostbird.localhost:3000/published
- add a webhook with
- test webhook by publishing a post in ghost
The ghostbird app will automatically update as you develop locally, as it reads the docker host's index.js
and runs with nodemon
for automatic reloads.