Instructions
Prerequisities
Read my article here which talks about the need for indieauth, webmention.io and brid.gy for webmentions to be received, and for mastodon and bluesky interactions to be received as webmentions. The code to display them is included below.
Download
Start by visiting the download link above to obtain the source from Codeberg.
In the Box
The files are packaged in the correct folder structure to be pasted directly into your project, which for new sites is straightforward - but for existing projects will overwite the following files where they exist.
/config
- hooks.php
/content
- functions.php
/content/includes
- footer.php
- header.php
- post-list.php
/content/layouts/
- .post.php
So when merging into an existing site it would be sensible to plan how to merge any existing customisations you have built into the files provided in this package.
Application Tokens & Passwords
To directly post to your Mastodon and Bluesky profiles you need to obtain security credentials for each, and copy them in place of the placeholders at the top of the config/hooks.php file. Replace everthing between the ' ' marks.
define('MASTODON_INSTANCE', '{{ADD THE URL OF YOUR OWN MASTODON INSTANCE}}');
define('MASTODON_TOKEN', '{{ADD YOUR TOKEN HERE}}');
define('BLUESKY_HANDLE', '{{ADD YOUR BSKY USERNAME HERE'); // or custom domain e.g. prry.uk
define('BLUESKY_APP_PASSWORD', '{{ADD YOUR OWN APP PASSWORD HERE}}'); // Settings → App Passwords
Mastodon
Preferences > Development > New Application, Grant Read, write, and profile permissions, and copy 'Your access token'
Bluesky
Settings > Privacy & Security > App Passwords > Add App Password Copy the password - you will not be able to retrieve it later
Admin Includes
The following can be pasted directly into the corresponding box in Pure Blog Admin