build(justfile): commit new daily email post
This commit is contained in:
parent
168f51105d
commit
75f713e1c7
6
run
6
run
|
@ -28,7 +28,7 @@ function task:daily {
|
|||
slug=$(echo "${title}" | awk '{print tolower($0)}' | tr ' ' '-')
|
||||
|
||||
# Create the file.
|
||||
cp -vf --no-clobber stub.md "${filepath}"
|
||||
cp -f --no-clobber stub.md "${filepath}"
|
||||
|
||||
local day
|
||||
local month
|
||||
|
@ -43,6 +43,10 @@ function task:daily {
|
|||
sed -i "s/{{ title }}/${title}/" "${filepath}"
|
||||
sed -i "s#{{ permalink }}#archive/${year}/${month}/${day}/${slug}#" "${filepath}"
|
||||
|
||||
# Create a commit with the appropriate date in the message
|
||||
git add "${filepath}"
|
||||
git commit -m "daily-email: add ${date}"
|
||||
|
||||
echo "${filepath}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue