This project is no longer actively maintained because the blog which caused the whole project went down. PRs are still accepted but there is no reason to actively work on this.
I created ghosthook to serve as an adapter between the Ghost blogging platform and various other platforms (first and foremost Discord).
Feel free to open a issue or PR to add support for more.
It's pretty straight forward: Either download the precompiled binary from the releases page or get the sourcecode and compile it yourself.
- Create a
config.toml
with all the config parameters shown below. - Create a new custom ghost integration the the admin dashboard and to point the url to
http://<host_uri>/post/published
. - Try to start the adapter and publish a test post to ensure everything is working as indented. If any errors occur, please open an issue.
ghosthook uses a config file in the toml format. For the required and optional parameters, please see below.
config value | use | example | default | required? |
---|---|---|---|---|
host_uri |
Set the ip and port to bind to | 127.0.01:2354 |
-/- | yes |
preview_length |
Set the amount of text that will be previewed in the hook's message |
150 |
-/- | yes |
webhook_username |
The name the app uses in its webhooks | ghosthook |
-/- | yes |
webhook_avatar_url |
Set the avatar the webhooks uses | https://example.com/ghosthook.png |
-/- | yes |
discord_webhooks |
This can hold an unlimited amount of credentials to discord webhooks | [{id = 123, token = "tkn"}, {id = 321, token = "TOKEN"}] |
-/- | yes |
Endpoint | Use |
---|---|
/post/published |
Trigger the Post Published webhook message |
This project is licensed under either the Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution submitted by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.