Code Monkey home page Code Monkey logo

tratschtante's Introduction

Kirby Tratschtante

DEPRECATED


THIS PLUGIN WILL BE DISCONTINUED! With the launch of Kirby 3.6 this plugin won't receive updates. Please switch to IndieConnector which comes with the same base functionality and which is 100% compatible with this plugin.


GitHub release License Kirby Version


This plugin currently works only with webmention.io.

Add the Tratschtante Endpoint to your webmention.io Webhooks and enter the callback secret you set in your kirby config.

Installation

  • composer require mauricerenck/tratschtante
  • unzip master.zip to site/plugins/tratschtante
  • git submodule add https://github.com/mauricerenck/tratschtante.git site/plugins/tratschtante

Config

You have to set a callback secret in your config.php

[
    'mauricerenck.tratschtante.secret' => 'my-secret',
]
  • Go to your webemention.io account and to Webhooks.
  • Enter the Tratschtante endpoint: https://your-url.tld/tratschtante/webhook/webmentionio
  • Enter the callback secret you set in your config.php

Usage

Whenever a webmention ins received, Tratschtante will trigger a Kirby-Hook your plugin can subscribe to:

'hooks' => [
    'tratschtante.webhook.received' => function ($webmention, $targetPage) {
        // $webmention: webmention data, see below
        // $targetPage: a kirby page object

        // YOUR CODE
    }
],

Data

Tratschtante will handle an array with some data to you:

[
'type' => STRING // one of the webmention.io types, see https://webmention.io/settings/webhooks,
'target' => 'target url',
'source' => 'source url',
'published' => 'publication date',
'author' => [
    'type' => 'card' or null,
    'name' => 'name' or null,
    'avatar' => 'avatar-url' or null,
    'url' => 'author url' or null,
],
'content' => 'comment text or empty string'
]

Future Plans

  • Sending webmentions (already implemented elsewhere, just have to move it here)
  • Support for "native" webmentions, not only webmention.io

tratschtante's People

Contributors

mauricerenck avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.