Skip to content

Add Mastodon syndication support via Bridgy#145

Open
danielmatthew wants to merge 1 commit into
mainfrom
claude/optimistic-shannon-wdH5T
Open

Add Mastodon syndication support via Bridgy#145
danielmatthew wants to merge 1 commit into
mainfrom
claude/optimistic-shannon-wdH5T

Conversation

@danielmatthew
Copy link
Copy Markdown
Owner

Summary

This PR adds support for syndicating blog posts to Mastodon using Bridgy's webmention publishing service. It includes a new GitHub Actions workflow to automatically send webmentions when posts are published, microformat markup for proper syndication, and webmention endpoint configuration.

Key Changes

  • New GitHub Actions Workflow (syndicate-to-mastodon.yml): Automatically detects new or modified posts in the src/content/posts/ directory, waits for the Netlify deployment to be live, and sends webmentions to Bridgy Publish for Mastodon syndication.

  • Microformat Markup (src/pages/notes/[...slug].astro): Added h-entry microformat classes to the post template:

    • h-entry on the article element
    • dt-published on the publication date
    • p-name for the post title
    • u-url for the canonical URL
    • u-syndication for syndication links
    • e-content for the post content
  • Webmention Configuration (src/layouts/BaseLayout.astro): Added webmention and pingback endpoint links to enable receiving webmentions from other sites.

  • Content Schema Update (src/content.config.js): Added optional syndicationUrl field to post frontmatter to track syndicated copies of posts.

Implementation Details

The workflow waits up to 5 minutes for the site to be deployed before sending webmentions, ensuring the new content is live and discoverable. Posts are identified by their filename slug, and the syndication URL is constructed as https://danmatthew.co.uk/notes/{slug}/. The microformat markup enables Bridgy to properly parse and syndicate the content to Mastodon.

https://claude.ai/code/session_011QXNRDSYqNMS9wQQTTtJHx

- Add microformats2 markup (h-entry, e-content, dt-published, u-url,
  p-name, u-syndication) to the notes post template so Bridgy can parse
  posts for syndication
- Add optional syndicationUrl field to posts schema; when set, renders a
  visible "View on Mastodon" link instead of the hidden Bridgy target
- Add webmention and pingback endpoint links to BaseLayout head for
  receiving backfeed (requires one-time webmention.io registration)
- Add GitHub Action that fires on pushes to main when posts change,
  waits for Netlify deploy, then sends webmentions to Bridgy Publish

https://claude.ai/code/session_011QXNRDSYqNMS9wQQTTtJHx
@netlify
Copy link
Copy Markdown

netlify Bot commented May 30, 2026

👷 Deploy Preview for danmatthew processing.

Name Link
🔨 Latest commit 4f4c9de
🔍 Latest deploy log https://app.netlify.com/projects/danmatthew/deploys/6a1b22099397cc00087395ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants