From 3058200899fcb958d1fc1e6d29163611824bee62 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 31 Dec 2023 17:50:38 +0100 Subject: [PATCH] Fix caching in watch mode, v0.3.4 --- CHANGELOG.md | 4 ++++ src/quickblog/internal.clj | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90cdaff..c586777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ Instances of quickblog can be seen here: - [Henry Widd's blog](https://widdindustries.com/blog) - [Anders means different](https://www.eknert.com/blog) - ([source](https://github.com/anderseknert/blog)) +## 0.3.4 (2023-12-31) + +- Fix caching in watch mode + ## 0.3.3 (2023-12-27) - [#86](https://github.com/borkdude/quickblog/issues/86): group archive page by year diff --git a/src/quickblog/internal.clj b/src/quickblog/internal.clj index 4f84944..330e5ba 100644 --- a/src/quickblog/internal.clj +++ b/src/quickblog/internal.clj @@ -278,7 +278,7 @@ set)) (defn modified-posts [{:keys [force-render out-dir posts posts-dir - rendering-system-files]}] + rendering-system-files watch]}] (->> posts (filter (fn [[file _]] (let [out-file (fs/file out-dir (html-file file)) @@ -288,7 +288,8 @@ (cons post-file rendering-system-files)) ;; watch mode adds a live reloading script, which should be ;; removed on subsequent renders - (str/includes? (slurp out-file) live-reload-script))))) + (and (str/includes? (slurp out-file) live-reload-script) + (not watch)))))) (map first) set))