Skip to content

Commit

Permalink
util: bin/new-til.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
joonas-fi committed Aug 5, 2024
1 parent b188a08 commit 873ed6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bin/new-til.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -eu

title="$1"

# TODO: translate spaces to dashes
id="$title"

year=$(date +"%Y")

hugo new --kind posts-bundle "today-i-learned/$year/$id"

chown -R 1000:1000 "content/today-i-learned/$year/$id"

0 comments on commit 873ed6f

Please sign in to comment.