Hexo supports Asset Folders to neatly store assets for posts in a corresponding folder. When converting my blog from Jekyll to Hexo, I had to create a ton of asset folders and have written a little script for it. In this post I’ll share it for anybody to save some time figuring this out.
If you have existing posts in Markdown, this script should work right away:
mkdir $(basename -a -s .md ./*.md)
If your files have a different extension, change .md to match the extension you’re using and it should work.