Import your Disqus Comments to Eleventy

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 pryi…


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman

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:


This content originally appeared on Zach Leatherman and was authored by Zach Leatherman


Print Share Comment Cite Upload Translate
APA
Zach Leatherman | Sciencx (2022-12-01T20:49:24+00:00) » Import your Disqus Comments to Eleventy. Retrieved from https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/.
MLA
" » Import your Disqus Comments to Eleventy." Zach Leatherman | Sciencx - Thursday April 19, 2018, https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/
HARVARD
Zach Leatherman | Sciencx Thursday April 19, 2018 » Import your Disqus Comments to Eleventy., viewed 2022-12-01T20:49:24+00:00,<https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/>
VANCOUVER
Zach Leatherman | Sciencx - » Import your Disqus Comments to Eleventy. [Internet]. [Accessed 2022-12-01T20:49:24+00:00]. Available from: https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/
CHICAGO
" » Import your Disqus Comments to Eleventy." Zach Leatherman | Sciencx - Accessed 2022-12-01T20:49:24+00:00. https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/
IEEE
" » Import your Disqus Comments to Eleventy." Zach Leatherman | Sciencx [Online]. Available: https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/. [Accessed: 2022-12-01T20:49:24+00:00]
rf:citation
» Import your Disqus Comments to Eleventy | Zach Leatherman | Sciencx | https://www.scien.cx/2018/04/19/import-your-disqus-comments-to-eleventy/ | 2022-12-01T20:49:24+00:00
https://github.com/addpipe/simple-recorderjs-demo