The Jekyll-to-Hugo post conversion that I need

While I wait to hear back on an error in an existing conversion script, here is what I really need…

I need the following steps to be performed as part of a conversion:

  1. Copy date from file name
  2. Add date to post front matter
  3. rename the file, removing the date

I would be satisfied with simply the ability to extract the date from the file name and insert it into the front matter, but combining the file rename would be very helpful. The current blog I’m working on has 150 posts which I have imported from Wordpress and refined into Jekyll format, but this Hugo conversion has added some wrinkles…

It looks like the conversion script will already add the date to the front matter if no date is already in the front matter. Once the conversion script is done, just rename all your files to remove the date from the filename.

First the conversion script needs to not error out on me :slight_smile:

I ended up running a separate script which added the name to the files, then ran Sublime Text macros to strip the filename and move the date to the date: field. Then I used an old Windows exe named ‘renamer’ to strip the dates off of the front of the file names themselves.