A tool to migrate my website content written in Markdown format, from one static site generator (SSG) to another.
Specifically, migrating my content from Hugo to Zola.
It is designed to:
-
Migrate content from one content directory to another.
-
Update the front matter of each post.
- Convert the format of the front matter to TOML.
- Add an extra option required for the theme I'm using.
-
Add a short code to the post content to use the co-located photos
-
Convert co-located photos from the JPEG format to the more efficient WebP format.
I named the tool after 'verso' the left side of the page and 'recto' the right side of the page.
- Verso - the source directory, the left side of the migration.
- Recto - the destination directory, the right side of the migration.
The results of the migration are likely not to be exactly what you need. The tool works for me and my plans to migrate my website. I've put the code here as an example of an approach to content migration.
To use the tool you need to download the source code.
Install the dependencies:
npm installInstall the cwebp tool, on my system I use homebrew:
brew install webpLink the tool into your path
npm linkInvoke the tool with the two required parameters
verso-recto <verso-path> <recto-path>My thanks to everyone who has contributed to all the projects that made this possible. 🙏😊💖