I’ve finally managed to import the comments from my old blog into Disqus, which can then be included in Octopress just by editing _config.yml
I’ve written a Ruby script (my first!) to convert the BlogML from Subtext into Disqus’ wordpress based custom XML import format.
BlogML to Disqus custom XML import Ruby script
Things to remember:
- it works on my machine – your milage may vary (let me know if you have problems, or even better, fix them in the script).
- I had to edit all of my previously imported blog posts, adding the “comments: true” header line before the comments would show up.
- Comments only appear on the permalink page – not the homepage.
- I manually tweaked the XML generated to fix my own username and email address so my gravatar appears consistently where I’d inconsistently replied to other comments.
- Definately create a test shortname, and try your import out on that. Re-importing to the same shortname (for example, because you’ve fixed a mistake) doesn’t seem to update the already imported comments. I created another test shortname.
- I can’t seem to delete test shortnames once I’m done with them.
- Don’t forget to uncheck “Enable Promoted Discovery” – That’s adverts which Disqus will inject into your blog with the comments.