Publish Originally, Syndicate Elsewhere

Shreyas Prakash headshot

Shreyas Prakash

Writing for yourself on your personal website is the purest form of self-expression on the internet. It avoids any trappings from the algorithmic maze. And there are no digital echo chambers. It’s just you and your ideas in your own cozy little garden.

We’re witnessing the renaissance of personal websites. As social platforms become increasingly unstable, more creators are rediscovering the power of digital sovereignty.

The only thing which I found broken (or missing) is a sense of participation between personal websites. It’s inordinately difficult for bloggers to talk with each other without relying on social media as the bridge (more on ‘bridges’ later). You see us sharing blogpost links on platforms to increase the surface area of our ideas written.

I found myself on the receiving end of this strange paradox. I craved for the reach social media offered, but yet wanted the autonomy to own and maintain my own personal pin code on the internet, where I write (selfishly) for myself.

Last year I focussed less on the “distribution” of ideas, and put in efforts more to the actual “creation” of them. It was still an itch I couldn’t scratch, until I was recently introduced to this concept of POSSE — Publish Own Sire, Syndicate Elsewhere. An IndieWeb solution to maintain your independence while participating in the larger internet discourse.

Calling POSSE, a concept might be too reductive. It’s a movement in itself picking up steam with the rise of various IndieWeb sister-concepts and other ideologically inclined social media platforms that faciliateed this movement such as Bluesky, Mastodon, Threads etc.

Source: Zach’s video on POSSE

So I wanted to stretch this idea as much as possible and figured out a solution to ditch the platform dependent comments (Ghost comments) for a more platform agnostic webmentions that gathered mentions of your blogpost across the internet, and into your blog (automagically) using the Brid.gy protocol.

I am not internet-famous, and don’t really have much of internet mentions. This is a rudimentary hello-world demo of me, mentioning my own post on Mastodon 😂

This is my final implementation of Webmentions. As you can see here, I tried heading to Mastodon and commenting on a blog from this site on their platform.

Jokes aside, on a more tactical front, I will show you how you could implement Webmentions to your own Ghost blog.

The rest of the blog goes into the nitty-gritty on how to set this up:

Let’s start by telling the internet that your site CAN receive webmentions.

Add these lines to your Ghost header via Custom Injection. Your site needs to know how to display these inter-website conversations. We’ll add specialized CSS to your site header that handles everything from avatar displays to comment threading. This creates a clean, professional look that rivals any social media platform. I was inspired by Maggie Appleton’s webmentions on her site, and I quickly hacked together a prototype using Claude Projects:

Webmentions implemented on Maggie Appleton’s site

Add these lines to the Ghost header as well via Custom Injection. This includes setting up indieweb authorisation, webmentions as well as webmention related styles:

<link rel="microsub" href="https://aperture.p3k.io/microsub/1003">
<link rel="authorization_endpoint" href="https://indieauth.com/auth">
<link rel="token_endpoint" href="https://tokens.indieauth.com/token">
<link rel="me" href="https://github.com/[github-profile]">

<link rel="webmention" href="https://webmention.io/www.[website-name].com/webmention">
<link rel="pingback" href="https://webmention.io/[website-name].com/[code]">

<!-- <link rel="webmention" href="https://webmention.io/[website-name].com/webmention">
<link rel="pingback" href="https://webmention.io/[website-name].com/[code]"> -->


<style>
  /* Container */
.wm-container {
    background: var(--color-four);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px var(--opacity-four);
    padding: 2.5rem;
    margin: 4rem 0 6rem;
}

/* Header */
.wm-header {
    font-family: var(--font-family-one);
    font-size: 2.8rem;
    font-weight: var(--font-weight-one-bold);
    color: var(--color-font-one);
    margin-bottom: 2rem;
}

/* Likes and Retweets Section */
.wm-avatar-grid {
    display: flex;
    align-items: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: var(--border) var(--color-border-one);
}

.wm-avatar-grid .wm-avatar-link {
    width: 40px;
    height: 40px;
    margin-right: -10px;
    position: relative;
    z-index: 1;
}

.wm-avatar-grid .wm-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-four);
    object-fit: cover;
}

.wm-reactions-count {
    font-size: 1.6rem;
    color: var(--color-font-one);
    margin-left: 1.5rem;
}

/* Comments Section */
.wm-mention-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 15px;
    padding: 20px 0;
    border-bottom: var(--border) var(--color-border-one);
}

.wm-mention-item:last-child {
    border-bottom: none;
}

/* Author Image */
.wm-author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Content Container */
.wm-mention-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Author Name */
.wm-author-name {
    font-size: 1.6rem;
    font-weight: var(--font-weight-three-bold);
    color: var(--color-font-one);
    text-decoration: underline;
}

/* Content */
.wm-mention-content {
    font-size: 1.6rem;
    color: var(--color-font-one);
    line-height: 1.5;
}

/* Source and Date Line */
.wm-mention-source-line {
    font-size: 1.6rem;
    color: var(--color-font-two);
}

.wm-mention-source {
    color: var(--ghost-accent-color);
    text-decoration: underline;
}

.wm-mention-metadata {
  font-size: 1.6rem;
}
  
</style>
<script src="/assets/js/webmention.js" async></script>

Remove Ghost comments

Modify your post.hbs template to replace native comments with webmentions:

<div class="post-content">
    {{#if access}}
        {{content}}
        {{^is "page"}}
            {{>posts/share}}
            <div id="webmentions"></div>
        {{/is}}
    {{else}}
        {{#if html}}
            <div class="members-cta-teaser">
                {{{html}}}
            </div>
        {{/if}}
        {{>members/cta}}
    {{/if}}
</div>

Install Webmention Handler

Create webmention.js in your assets/js directory. Also update fetchWebmentions function to handle www and non-www URLs:

class WebmentionHandler {
  constructor(targetSelector = '#webmentions') {
      this.targetSelector = targetSelector;
      this.container = null;
      this.cache = new Map();
      this.initialized = false;
  }

  init() {
      if (this.initialized) return;
      
      // Wait for DOM to be ready
      if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', () => this.setup());
      } else {
          this.setup();
      }
      
      this.initialized = true;
  }

  setup() {
      this.container = document.querySelector(this.targetSelector);
      if (!this.container) {
          console.log('Webmention container not found');
          return;
      }

      // Show loading state
      this.container.innerHTML = '<div class="wm-loading">Loading mentions...</div>';
      
      const pageUrl = window.location.href.replace(/#.*$/, '');
      console.log('Fetching webmentions for:', pageUrl);
      
      this.fetchWebmentions(pageUrl)
          .then(mentions => this.renderWebmentions(mentions))
          .catch(error => this.handleError(error));
  }

  async fetchWebmentions(targetUrl) {
        // Check cache first
        if (this.cache.has(targetUrl)) {
            return this.cache.get(targetUrl);
        }

        try {
            // Create both www and non-www versions of the URL
            const url = new URL(targetUrl);
            let targets = [];
            
            // If URL has www, add non-www version
            if (url.hostname.startsWith('www.')) {
                targets.push(targetUrl);
                targets.push(targetUrl.replace('www.', ''));
            } else {
                // If URL doesn't have www, add www version
                targets.push(targetUrl);
                targets.push(targetUrl.replace('://', '://www.'));
            }

            // Create the endpoint URL with both targets
            const endpoint = 'https://webmention.io/api/mentions.jf2?' + 
                targets.map(t => 'target[]=' + encodeURIComponent(t)).join('&');
                
            console.log('Fetching from endpoint:', endpoint);

            const response = await fetch(endpoint);
            
            if (!response.ok) {
                throw new Error(`HTTP error! status: ${response.status}`);
            }
            
            const data = await response.json();
            console.log('Received webmentions:', data);

            // Cache both URL versions
            targets.forEach(t => this.cache.set(t, data));
            
            return data;
        } catch (error) {
            console.error('Error fetching webmentions:', error);
            throw error;
        }
    }

  renderWebmentions(data) {
    if (!this.container) return;

    if (!data.children || data.children.length === 0) {
        this.container.innerHTML = '<div class="wm-empty">No mentions yet</div>';
        return;
    }

    // Group by type
    const reactions = data.children.filter(m => 
        ['like-of', 'repost-of', 'bookmark-of'].includes(m['wm-property'])
    );
    const mentions = data.children.filter(m => 
        ['mention-of', 'in-reply-to'].includes(m['wm-property'])
    );

    let html = '<div class="wm-container">';

    // Render header and reactions grid
    html += `
        <h3 class="wm-header">Mentions around the web</h3>
        <div class="wm-avatar-grid">
            ${reactions.map(reaction => this.renderAvatar(reaction)).join('')}
            <span class="wm-reactions-count">${reactions.length} Likes and Retweets</span>
        </div>
    `;

    // Render mentions/comments with show more functionality
    if (mentions.length > 0) {
        html += `
            <div class="wm-mentions-list">
                ${mentions.map(mention => this.renderMention(mention)).join('')}
            </div>
            ${mentions.length > 4 ? 
                `<button class="wm-show-more">Show ${mentions.length - 4} more</button>` : 
                ''
            }
        `;
    }

    html += '</div>';
    this.container.innerHTML = html;

    // Add show more functionality
    const showMoreBtn = this.container.querySelector('.wm-show-more');
    if (showMoreBtn) {
        showMoreBtn.addEventListener('click', () => {
            this.container.querySelector('.wm-mentions-list').classList.add('wm-show-all');
            showMoreBtn.style.display = 'none';
        });
    }
  }


  renderAvatar(reaction) {
      const author = reaction.author || {};
      const defaultAvatar = 'https://webmention.io/avatar/default.svg';
      
      return `
          <a href="${reaction.url}" 
             class="wm-avatar-link" 
             target="_blank" 
             rel="noopener noreferrer"
             title="${author.name || 'Someone'} ${this.getReactionText(reaction['wm-property'])}">
              <img src="${author.photo || defaultAvatar}"
                   alt="${author.name || 'Anonymous'}"
                   loading="lazy"
                   class="wm-avatar-img"
                   onerror="this.src='${defaultAvatar}'">
          </a>
      `;
  }

  renderMention(mention) {
    const author = mention.author || {};
    const date = new Date(mention.published || mention['wm-received'])
        .toLocaleDateString('en-US', {
            year: 'numeric',
            month: 'long',
            day: 'numeric'
        });

    return `
        <div class="wm-mention-item">
            <img src="${author.photo || 'https://webmention.io/avatar/default.svg'}"
                 alt="${author.name || 'Anonymous'}"
                 loading="lazy"
                 class="wm-author-img">
            
            <div class="wm-mention-content-wrapper">
                <div class="wm-mention-header">
                    <a href="${author.url || mention.url}" 
                       class="wm-author-name" 
                       target="_blank" 
                       rel="noopener noreferrer">
                        ${author.name || 'Anonymous'}
                    </a>
                    <span class="wm-mention-metadata">
                        ${this.getMentionType(mention['wm-property'])} on
                        <a href="${mention.url}" 
                           class="wm-mention-source" 
                           target="_blank" 
                           rel="noopener noreferrer">
                            ${this.getSourceName(mention.url)}
                        </a>
                        — ${date}
                    </span>
                </div>
                ${mention.content?.text ? `
                    <div class="wm-mention-content">
                        ${this.formatContent(mention.content.text)}
                    </div>
                ` : ''}
            </div>
        </div>
    `;
  }


  getReactionText(type) {
      const texts = {
          'like-of': 'liked this',
          'repost-of': 'reposted this',
          'bookmark-of': 'bookmarked this'
      };
      return texts[type] || 'reacted to this';
  }

  getMentionType(type) {
      const types = {
          'mention-of': 'mentioned',
          'in-reply-to': 'replied to'
      };
      return types[type] || 'mentioned';
  }

  getSourceName(url) {
      try {
          const hostname = new URL(url).hostname.replace('www.', '');
          // Get first part of domain and capitalize it
          return hostname.split('.')[0].charAt(0).toUpperCase() + hostname.split('.')[0].slice(1);
      } catch (e) {
          return 'Link';
      }
  }

  formatContent(text) {
      // Escape HTML
      const escaped = text.replace(/[&<>"']/g, char => ({
          '&': '&amp;',
          '<': '&lt;',
          '>': '&gt;',
          '"': '&quot;',
          "'": '&#39;'
      }[char]));

      // Truncate if too long
      const maxLength = 280;
      if (escaped.length > maxLength) {
          return escaped.substring(0, maxLength) + '...';
      }

      return escaped;
  }

  handleError(error) {
      if (!this.container) return;
      console.error('Webmention error:', error);
      this.container.innerHTML = '<div class="wm-error">Error loading mentions</div>';
  }
}

// Initialize webmentions
const webmentions = new WebmentionHandler();
webmentions.init();

Configure Brid.gy Integration

Here’s the challenge: When you write a blog post, the conversations about it scatter across the internet like dandelion seeds in the wind. Someone shares it on Mastodon, another person discusses it on Bluesky, while others might reference it in their own blog posts.

This is where Brid.gy bridges the gap. When someone interacts with your syndicated content – whether through likes, reposts, or thoughtful replies – Brid.gy performs a crucial translation:

  1. It captures these interactions from social platforms
  2. Transforms them into standardized webmentions
  3. Sends them back to your blog via webmention.io

The magic happens in this translation layer. A Mastodon boost becomes a webmention your blog understands. A Bluesky reply transforms into a comment that appears below your original post. This creates a unified conversation where your blog becomes the central hub of discussion, not just the starting point.

Brid.gy’s real power lies in its bidirectional syndication:

Your Blog Post → Brid.gy → Mastodon, Reddit, Bluesky etc
Mastodon, Reddit, Bluesky etc → Brid.gy → Webmentions → Your Blog

Mastodon Setup

  1. Go to brid.gy
  2. Navigate to Mastodon section
  3. Input your Mastodon instance URL
  4. Authenticate your account
  5. Enable backfeeding
  6. Save your Micropub token

Bluesky Setup

  1. On brid.gy, locate Bluesky section
  2. Click “Get token”
  3. Enter your Bluesky handle
  4. Enable publishing and response tracking
  5. Store Micropub token securely

Testing Your Implementation

  1. Publish a new blog post
  2. Share it on connected social platforms
  3. Verify webmentions appear on your post
  4. Check console for any errors
  5. Verify URL handling works for both www and non-www variants

And that’s it. By implementing webmentions on your Ghost blog, you’re not just adding a feature - you’re joining a movement toward a more open, interconnected web.

The web was never meant to be a collection of isolated platforms. Your digital homestead awaits.

Subscribe to get future posts via email (or grab the RSS feed). 2-3 ideas every month across design and tech

Read more

  1. Breadboarding, shaping, slicing, and steelthreading solutions with AI agentsproduct-management
  2. How I started building softwares with AI agents being non technicalagentic-engineering
  3. Legible and illegible tasks in organisationsproduct
  4. L2 Fat marker sketchesdesign
  5. Writing as moats for humanswriting
  6. Beauty of second degree probesdecision-making
  7. Read raw transcriptsknowledge
  8. Boundary objects as the new prototypesprototyping
  9. One way door decisionsproduct
  10. Finished softwares should existproduct
  11. Essay Quality Rankerobsidian
  12. Export LLM conversations as snippetsbrowser-extension
  13. Flipping questions on its headinterviewing
  14. Vibe writing maximswriting
  15. How I blog with Obsidian, Cloudflare, AstroJS, Githubwriting
  16. How I build greenfield apps with AI-assisted codingai-coding
  17. We have been scammed by the Gaussian distribution clubmathematics
  18. Classify incentive problems into stag hunts, and prisoners dilemmasgame-theory
  19. I was wrong about optimal stoppingmathematics
  20. Thinking like a ship
  21. Hyperpersonalised N=1 learningeducation
  22. New mediums for humans to complement superintelligenceai-coding
  23. Maxims for AI assisted codingai-coding
  24. Personal Website Starter Kitai-coding
  25. Virtual bookshelvesaesthetics
  26. It's computational and AI everythingai-coding
  27. Public gardens, secret routesdigital-garden
  28. Git way of learning to codeai-coding
  29. Kaomoji generatorsoftware
  30. Copy, Paste and Citecuriosities
  31. Style Transfer in AI writingai-coding
  32. Understanding codebases without using codeai-coding
  33. Vibe coding with Cursorai-coding
  34. Virtuoso Guide for Personal Memory Systemsmemory
  35. Writing in Future Pastwriting
  36. Publish Originally, Syndicate Elsewhereblogging
  37. Poetic License of Designdesign
  38. Idea in the shower, testing before breakfastsoftware
  39. Technology and regulation have a dance of ice and firetechnology
  40. How I ship "stuff"software
  41. Weekly TODO List on CLIcli
  42. Writing is thinkingwriting
  43. Song of Shapes, Words and Pathscreativity
  44. How do we absorb ideas better?knowledge
  45. Read writers who operatewriting
  46. Brew your ideas lazilyideas
  47. Vibescreativity
  48. Trees, Branches, Twigs and Leaves — Mental Models for Writingwriting
  49. Compound Interest of Private Notesknowledge
  50. Conceptual Compression for LLMsai-coding
  51. Meta-analysis for contradictory research findingsdigital-health
  52. Beauty of Zettelswriting
  53. Proof of workproduct
  54. Gauging previous work of new joinees to the teamleadership
  55. Task management for product managersproduct
  56. Stitching React and Rails togetherai-coding
  57. Exploring "smart connections" for note takingknowledge
  58. Deploying Home Cooked Apps with Railssoftware
  59. Self Marketing
  60. Repetitive Copypromptingwriting
  61. Questions to ask every decadejournalling
  62. Balancing work, time and focusproductivity
  63. Hyperlinks are like cashew nutswriting
  64. Brand treatments, Design Systems, Vibesdesign
  65. How to spot human writing on the internet?writing
  66. Can a thought be an algorithm?product
  67. Opportunity Harvestingcareers
  68. How does AI affect UI?design
  69. Everything is a prioritisation problemproduct-management
  70. Nowlifestyle
  71. How I do product roastsproduct
  72. The Modern Startup Stacksoftware
  73. In-person vision transmissionproduct
  74. How might we help children invent for social good?social-design
  75. The meeting before the meetingmeetings
  76. Design that's so bad it's actually gooddesign
  77. Breaking the fourth wall of an interviewinterviewing
  78. Obsessing over personal websitessoftware
  79. Convert v0.dev React to Rails ViewComponentsrails
  80. English is the hot new programming languagesoftware
  81. Better way to think about conflictsconflict-management
  82. The role of taste in building productsdesign
  83. World's most ancient public health problemsoftware
  84. Dear enterprises, we're tired of your subscriptionssoftware
  85. Products need not be user centereddesign
  86. Pluginisation of Modern Softwaredesign
  87. Let's make every work 'strategic'consulting
  88. Making Nielsen's heuristics more digestibledesign
  89. Startups are a fertile ground for risk takingentrepreneurship
  90. Insights are not just a salad of factsdesign
  91. Minimum Lovable Productproduct
  92. Methods are lifejackets not straight jacketsmethodology
  93. How to arrive at on-brand colours?design
  94. Minto principle for writing memoswriting
  95. Importance of Whytask-management
  96. Quality Ideas Trump Executionsoftware
  97. How to hire a personal doctor
  98. Why I prefer indie softwareslifestyle
  99. Use code only if no code failscode
  100. Personal Observation Techniquesdesign
  101. Design is a confusing worddesign
  102. A Primer to Service Design Blueprintsdesign
  103. Rapid Journey Prototypingdesign
  104. Directory Structure Visualizercli
  105. AI git commitscli
  106. Do's and Don'ts of User Researchdesign
  107. Design Manifestodesign
  108. Complex project management for productproducts
  109. How might we enable patients and caregivers to overcome preventable health conditions?digital-health
  110. Pedagogy of the Uncharted — What for, and Where to?education
  111. Future of Ageing with Mehdi Yacoubiinterviewing
  112. Future of Equity with Ludovick Petersinterviewing
  113. Future of Mental Health with Kavya Raointerviewing
  114. Future of Tacit knowledge with Celeste Volpiinterviewing
  115. Future of Rural Innovation with Thabiso Blak Mashabainterviewing
  116. Future of unschooling with Che Vanniinterviewing
  117. Future of work with Laetitia Vitaudinterviewing
  118. How might we prevent acquired infections in hospitals?digital-health
  119. The soul searching yearsentrepreneurship
  120. Design education amidst social tribulationsdesign
  121. How might we assist deafblind runners to navigate?social-design