This commit is contained in:
octospacc 2024-01-20 17:51:03 +01:00
parent b93c6eda68
commit f1f499e501
2 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ package-json.lock
_site
node_modules
_drafts
.CommitMessage.txt

View File

@ -2,10 +2,12 @@
cd "$( dirname "$( realpath "$0" )" )"
[ "$1" = "update" ] && \
git add . && git commit -m ": $2" && git push
Message="$( [ -n "$2" ] && echo "$2" || cat .CommitMessage.txt )"
git add . && git commit -m ": ${Message}" && git push
[ "$1" = "newpost" ] && [ -n "$2" ] && [ -n "$3" ] && \
mkdir -p "./assets/media/games/$2" && \
echo "Add $2 [$3]" > .CommitMessage.txt && \
cat << [EOF] > "./_posts/$3-$2.md"
---
layout: "post"