aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-03 04:25:49 -0400
committertdro <tdro@noreply.example.com>2022-05-03 04:25:49 -0400
commite92dc018e28ba8d44f1c6cbc9fb0b779dec271e6 (patch)
tree3667043819ab91065019dfe3b4ff83ad625c2b49 /Makefile
downloadcanory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.gz
canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.tar.bz2
canory-e92dc018e28ba8d44f1c6cbc9fb0b779dec271e6.zip
config.yaml: Commission
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile64
1 files changed, 64 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..99aef3d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,64 @@
+all:
+ make config
+ make js
+ make hugo
+
+config:
+ yj -yj -i < config.yaml > config.json
+ yj -yt -i < config.yaml > config.toml
+
+watch:
+ while true; do find . | entr -d -s 'make all'; done
+
+js:
+ deno bundle --no-check --config tsconfig.json static/js/index.ts static/js/index.js
+
+hugo:
+ rm -rf public
+ hugo
+ rm -f .hugo_build.lock
+
+server:
+ php -S 127.0.0.1:9294 -t public
+
+author:
+ifndef user
+ @printf 'Error: No author user name given!\nUsage: make author user=default\n'
+else
+ @cp -rT content/default content/$(user) || printf "Error: Author user '$(user)' data may already exist.\n"
+ @cp -rT data/authors/default.yaml data/authors/$(user).yaml || printf "Error: Author user '$(user)' configuration may already exist.\n"
+ _user=$(user) && \
+ _name=$${_user^} && \
+ grep -rl "default" content/$(user) | xargs sed --in-place 's/default/$(user)/g' && \
+ grep -rl "default" data/authors/$(user).yaml | xargs sed --in-place 's/default/$(user)/g' && \
+ grep -rl "Default" data/authors/$(user).yaml | xargs sed --in-place "s/Default/$$_name/g"
+endif
+
+icons:
+ rm -rf static/icons
+ mkdir -p static/icons/feather static/icons/tabler
+ svn export --force https://github.com/feathericons/feather/trunk/LICENSE static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/alert-circle.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/archive.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/arrow-left.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/arrow-right.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/arrow-up.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/circle.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/clock.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/copy.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/eye-off.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/git-commit.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/globe.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/tag.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/heart.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/home.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/map-pin.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/rss.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/search.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/trash-2.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/user.svg static/icons/feather
+ svn export --force https://github.com/feathericons/feather/trunk/icons/users.svg static/icons/feather
+ svn export --force https://github.com/tabler/tabler-icons/trunk/LICENSE static/icons/tabler
+ svn export --force https://github.com/tabler/tabler-icons/trunk/icons/pinned.svg static/icons/tabler
+ svn export --force https://github.com/tabler/tabler-icons/trunk/icons/book-2.svg static/icons/tabler
+ svn export --force https://github.com/tabler/tabler-icons/trunk/icons/clock.svg static/icons/tabler