-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eleventy-plugin-telegram): rename package
- Loading branch information
Showing
18 changed files
with
203 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# @jackdbd/eleventy-plugin-telegram | ||
|
||
[![npm version](https://badge.fury.io/js/@jackdbd%2Feleventy-plugin-telegram.svg)](https://badge.fury.io/js/@jackdbd%2Feleventy-plugin-telegram) | ||
![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jackdbd%2Feleventy-plugin-telegram) | ||
|
||
Eleventy plugin that send messages to a Telegram chat of your choice. | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install --save-dev @jackdbd/eleventy-plugin-telegram | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
```js | ||
const { telegramPlugin } = require('@jackdbd/eleventy-plugin-telegram') | ||
|
||
module.exports = function (eleventyConfig) { | ||
// some eleventy configuration... | ||
|
||
eleventyConfig.addPlugin(telegramPlugin, { | ||
chatId: 'YOUR_TELEGRAM_CHAT_ID', | ||
token: 'YOUR_TELEGRAM_BOT_TOKEN', | ||
textBeforeBuild: '11ty have just started building my site', | ||
textAfterBuild: '11ty has finished building my awesome site' | ||
}) | ||
|
||
// some more eleventy configuration... | ||
} | ||
``` | ||
|
||
See Telegram [sendMessage](https://core.telegram.org/bots/api#sendmessage) API method for formatting options. | ||
|
||
## Configuration | ||
|
||
### Required parameters | ||
|
||
| Parameter | Explanation | | ||
| --- | --- | | ||
| `chatId` | Your Telegram chat ID. | | ||
| `token` | Your Telegram Bot token. If you forgot the API token of a Telegram bot you created, you can retrieve it at any time using BotFather. Just go to `BotFather > bot list > API token`. | | ||
|
||
### Options | ||
|
||
| Option | Default | Explanation | | ||
| --- | --- | --- | | ||
| `textBeforeBuild` | `🏎️ 11ty has <b>started</b> building the site` | Text message to send when Eleventy starts building the site. | | ||
| `textAfterBuild` | `🏁 11ty has <b>finished</b> building the site` | Text message to send when Eleventy finishes building the site. | | ||
|
||
> :information_source: a Telegram message can be 1-4096 characters long, after entities parsing. See [formatting options here](https://core.telegram.org/bots/api#formatting-options). |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...eleventy-telegram-plugin/src/constants.ts → ...eleventy-plugin-telegram/src/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters