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.

![[Attachments/images/2025/01/image-13.png]]

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 😂

![[Attachments/images/2025/01/image-12.png]]

![[Attachments/images/2025/01/Screenshot-2025-01-16-at-7.39.16-PM.png]]

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:

![[Attachments/images/2025/01/Screenshot-2025-01-16-at-7.52.52-PM.png]]

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.

Update: This was implemented for my previous version of my web page which was on Ghost. Now that I’ve written the new site on Astro JS, I would still have to rewrite this implementation for my new home.

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

Read more

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