Skip to content

Commit

Permalink
The site-publish-draft script uses git mv to maintain history
Browse files Browse the repository at this point in the history
  • Loading branch information
npryce committed Jun 3, 2024
1 parent e9aad4b commit 96bd0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site-publish-draft
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ draftfile="$(echo "$draft" | sed -e 's:^_drafts/::g')"
categorydir="$(dirname "$draftfile")"
post="_posts/$categorydir/$(date +%Y-%m-%d)-$(basename "$draft")"

mv "$draft" "$post"
git mv "$draft" "$post"
echo published as "$post"

0 comments on commit 96bd0ee

Please sign in to comment.