Skip to content

yasoob/wordpress_to_staticman_comments

master
Switch branches/tags
Code
This branch is 2 commits ahead of dancwilliams:master.
Contribute

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Wordpress to Staticman Comments

The original script was written by Dan as a quick-fix for his usage. I don't know if he intended for anyone else to use it eventually. I ended up modifying his script quite a lot to suit my own needs while moving from Wordpress to Hugo. Needless to say, the script is still rough and I modified it just enough so that my own use-cases were being catered to. I am hopeful that it will work fine for you too but try it at your own risk. Or maybe you can fork this and add the functionality you want and open up a PR? 😄

Requirements

  • Python 3
  • xmltodict (pip install xmltodict)

Run Instructions

  • Rename your wordpress xml dump file to big_data.xml and put it in the same folder as this script.
  • Run python wordpress_to_staticman.py

In the end just copy the comments folder to the data folder in the base directory of your Hugo source files.

Nested replies

If you don't already have nested comments functionality working in your Staticman installation, you can follow this tutorial to set that up. The output of this script will also work with nested replies!

About

This is a rough script to convert Wordpress comments to staticman comments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%