1: スクリプトを作成(仮に new.sh とする)

hugo new posts/$(date +"%Y")/$(date +"%m")/$1.md

2: 実行

% ./new.sh foo
/path/to/content/posts/2019/12/foo.md created