diff --git a/docs/activitypub.md b/docs/activitypub.md index 5e0533f..4e1a0e8 100644 --- a/docs/activitypub.md +++ b/docs/activitypub.md @@ -23,6 +23,8 @@ You can add a lot more information if you want to. [Have a read here](https://mi ## Setup +### Plugin + IndieConnector currently uses [brid.gy](https://fed.brid.gy/) to provide this functionality. Go to [brid.gy](https://fed.brid.gy/) and select the option "**Connect directly to the fediverse**". @@ -34,6 +36,10 @@ Enter your website url and brid.gy will peform some tests. It should prompt you After setting this, go to brid.gy and click on check now. This should now work and the prompt should disappear. +### Template + +In your template add this snippet ``. This will add the nessesary markup to your template. The best way to do so, is to add it into your post content within a `.h-entry` microformat. + ## Publishing posts Publishing works via webmentions. IndieConnector does this for you already. Once you enable the activityPub feature, this plugin will automatically send an additional webmention to brid.gy. The default rules (like restrictions by template) are applied. So please check those. diff --git a/index.php b/index.php index 0723b0b..7089084 100644 --- a/index.php +++ b/index.php @@ -13,6 +13,9 @@ 'options' => require_once(__DIR__ . '/internal/options.php'), 'hooks' => require_once(__DIR__ . '/internal/hooks.php'), 'areas' => require_once(__DIR__ . '/components/areas.php'), + 'snippets' => [ + 'activitypub-wm' => __DIR__ . '/snippets/activitypub-webmention.php', + ], 'routes' => [ [ 'pattern' => '(indieConnector|indieconnector)/webhook/webmentionio', diff --git a/snippets/activitypub-webmention.php b/snippets/activitypub-webmention.php new file mode 100644 index 0000000..f41d19a --- /dev/null +++ b/snippets/activitypub-webmention.php @@ -0,0 +1 @@ + \ No newline at end of file