1.0.0-alpha.1 • Published 2 years ago

@jackdbd/eleventy-telegram-plugin v1.0.0-alpha.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@jackdbd/eleventy-telegram-plugin

npm version Snyk Vulnerabilities for npm package

Eleventy plugin that send messages to a Telegram chat of your choice.

Installation

npm install --save-dev @jackdbd/eleventy-telegram-plugin

Usage

const { telegramPlugin } = require('@jackdbd/eleventy-telegram-plugin')

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 API method for formatting options.