Metalsmith migration tools or tips?

I’m trying to get a Hugo proof of concept running to replace an ancient Metalsmith (v1.7) build. However I don’t see an official tool in the Tools/Migrations section, but perhaps there are future plans, or enough tips/advice to scrape into a small doc?

I have not heard about any tools for Metalsmith to Hugo. I have done some conversions of some sites from other static site generators to Hugo (Middleman, Jekyll), and there has been a fair amount of legacy involved.

My approach is:

  • For content: If you find a converter to Jekyll you can use the built-in Hugo Jekyll importer.
  • For templates, I built myself some crude template converters that got the Go syntax mostly correct. This will only pay off if you have lots of templates. In any case I would really recommend take a step back and refactor your template structure to a less verbose Hugo structure.
  • Middleman and Jekyll also has a concept of “callouts” in Markdown, which I had to script replacements for. Most of these maps nicely to shortcodes.

Good points, thanks! I hadn’t thought about looking at a migration to one of the platforms that have an official Hugo migration tool (basically a two step). I suspect though that I’ll be comparing features between the 2 systems and bridging/re-engineering some pieces to get to parity, but could use the tools as a general guide to what I need to change.