This code converts Hugo's markdown posts to page bundles. However, would anyone kindly help with showing how to edit the code to exclude the _index.md
file from being converted?
for FILE in *.md
do
# remove the last dot and subsequent chars to name the folder from the .md
DIR="${FILE%.*}"
mkdir -p "$DIR"
mv "$FILE" "$DIR"
done
find ./ -iname '*.md' -execdir mv -i '{}' index.md \;