mattcens_mumblings/newpost

11 lines
233 B
Plaintext
Raw Permalink Normal View History

2022-04-14 03:31:13 +00:00
#!/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"