Skip to content

Commit

Permalink
fix: add activity pub snippet for more reliable webmention
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Dec 13, 2022
1 parent c900445 commit 66fa078
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/activitypub.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**".
Expand All @@ -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 `<?php snippet('activitypub-wm'); ?>`. 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.
Expand Down
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions snippets/activitypub-webmention.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a class="u-bridgy-fed" href="https://fed.brid.gy/"></a>

0 comments on commit 66fa078

Please sign in to comment.