Skip to content

Commit

Permalink
Fix caching in watch mode, v0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Dec 31, 2023
1 parent 78563bc commit 3058200
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/quickblog/internal.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))

Expand Down

0 comments on commit 3058200

Please sign in to comment.