Zach’s ugly mug (his face) Zach Leatherman

Import your Disqus Comments to Eleventy

April 19, 2018

I’m slowly migrating off of Disqus. I want to keep my existing comment content though.

Migration is an easy sell:

  • A few KB of static HTML is faster than the Disqus JavaScript. I lazy-load Disqus but it’s 430KB ⚠️.
  • No third party JavaScript—no prying eyes!
  • Comments available without JavaScript.
  • Full control over markup and style of comments (samples provided below). Finally, I can use my web fonts 😎.
  • No annoying loading delay when someone direct-links to a comment on your page.

I wrote up the steps I took to import the Disqus export XML in my eleventy blog. This method:

  • Properly maintains comment threading as shown in the Disqus interface.
  • Uses gravatar for avatar images.
  • Works with any existing links to Disqus comments in the wild (and no annoying delay waiting for Disqus to load and jump to the comment).

As an intermediate step, I still allow users to load the Disqus interface to participate in the discussion but these comments will not be available statically until I do another export/import—this is super easy after you do it once.

My goal is to add webmentions (thanks Nicolas for the tip!), but full credit to Staticman and utterances which look great too.


Find out more about Eleventy:


< Newer
preload with font-display: optional is an Anti-pattern
Older >
“The Compromise”—a Modern but Compatible Font Loading Strategy

Zach Leatherman IndieWeb Avatar for https://zachleat.com/is a builder for the web at IndieWeb Avatar for https://fontawesome.com/Font Awesome and the creator/maintainer of IndieWeb Avatar for https://www.11ty.devEleventy (11ty), an award-winning open source site generator. At one point he became entirely too fixated on web fonts. He has given 84 talks in nine different countries at events like Beyond Tellerrand, Smashing Conference, Jamstack Conf, CSSConf, and The White House. Formerly part of CloudCannon, Netlify, Filament Group, NEJS CONF, and NebraskaJS. Learn more about Zach »

1 Repost

IndieWeb Avatar for https://clicknow.in

3 Likes

Michal ČaplyginCarl Zulauf 🌹Jonathan Simcoe
1 Comment
  1. Nicholas C. Zakas

    @zachleat @craveytrain helpful, thanks.

Shamelessly plug your related post

These are webmentions via the IndieWeb and webmention.io.

Sharing on social media?

This is what will show up when you share this post on Social Media:

How did you do this? I automated my Open Graph images. (Peer behind the curtain at the test page)