From f0966984b6ae056439f012192bf3ea9d6a8d2588 Mon Sep 17 00:00:00 2001 From: Galuh Sahid Date: Wed, 27 Dec 2023 22:04:12 +0100 Subject: [PATCH] Update makefile --- Makefile | 20 ++++++++++++++------ README.md | 7 +++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e39325f..abf6053 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,20 @@ help: @echo "Available targets:" - @echo " publish Restart Docker Compose." - @echo " preview Run 'npx quartz build --serve'." + @echo " publish Restart Docker Compose (or run 'npx quartz build --serve' with local=True)." + @echo " preview Run 'npx quartz build --serve' with specific directories." -preview: - @npx quartz build --serve +# Default directories for the publish target +SOURCE_DIR = $(HOME)/Documents/obsidian/gal/Gal +DEST_DIR = $(HOME)/Workspace/heygal.space/content +# Target-specific variables for the publish target publish: - @./scripts/publish.sh - @docker compose restart \ No newline at end of file + @./scripts/publish.sh "$(SOURCE_DIR)" "$(DEST_DIR)" + @if [ "$(local)" = "True" ]; then \ + echo "Running npx quartz build --serve"; \ + npx quartz build --serve; \ + else \ + echo "Restarting Docker Compose"; \ + docker compose restart; \ + fi \ No newline at end of file diff --git a/README.md b/README.md index 4b4731c..870e0be 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # Quartz v4 +## Improvements +- scripts/publish.sh: + - [ ] Skip copying files that already exist + - [ ] Resize image to 60% for faster load +- add restart/publish to make +--- + > “[One] who works with the door open gets all kinds of interruptions, but [they] also occasionally gets clues as to what the world is and what might be important.” — Richard Hamming Quartz is a set of tools that helps you publish your [digital garden](https://jzhao.xyz/posts/networked-thought) and notes as a website for free.