1. Use https://github.com/SchumacherFM/wordpress-to-hugo-exporter

  2. Convert posts to page bundle https://gohugo.io/content-management/page-bundles/

cd content/posts
find . -maxdepth 1 -type f | grep -v index | while read line; do echo $line; mkdir ${line%%\.md}; mv $line ${line%%\.md}/index.md;done
  1. Cleanup each post, convert image reference to shortcode equivalent vim search and replace snippets
%s/^M//g
%s/>/>/g
%s/&lt;/</g
%s/\\_/_/g
%s/&#8217;/'/g
%s/&#8211;/-/g
%s/<\/p>//g
%s/<p>//g
%s/</pre>//g
%s/&#8220;/"/g
%s/&#8221;/"/g
%s/<br\ \/>//g
  1. Deploy at last. https://gohugo.io/hosting-and-deployment/hosting-on-github/

References:

https://laurakalbag.com/processing-responsive-images-with-hugo/

https://gohugo.io/hosting-and-deployment/hosting-on-github/