mattcens_mumblings/newpost

11 lines
233 B
Bash
Executable File

#!/usr/bin/env bash
post_title=$*
post_title_uri=${post_title,,}
post_title_uri=${post_title_uri//[[:punct:]]/}
post_title_uri=${post_title_uri// /\-}
post_path=content/posts/$(date +%F)-${post_title_uri}.md
hugo new "$post_path"