Old:

blog\
    mypost.md

New:

blog\
    mypost\
        index.md

Run this script in your content\blog folder:

#!/bin/bash

for filename in *.md; do
    [ -e "$filename" ] || continue
    echo Processing "$filename"
    echo creating directory $(basename "$filename" .md)
    directory=$(basename "$filename" .md)
    mkdir -p $directory
    mv $filename ${directory}/index.md
done

I put mine in a /bin/ directory in the blog repo, and added that directory to my $PATH using direnv.

Hugo Documentation