Skip to content

Commit

Permalink
v0.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Dec 31, 2023
1 parent ebf91f5 commit d00e14b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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.6 (2031-12-31)

- Fix caching (this is hard)

## 0.3.5 (2023-12-31)

- Better caching when switching between watch and render
Expand Down
16 changes: 9 additions & 7 deletions src/quickblog/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,14 @@
:favicon-out-dir (out-dir-ify favicon-out-dir))))

(defn update-cache-dir [opts]
(let [cache-dir (:cache-dir opts)
cache-dir (when cache-dir
(if (:watch opts)
(str (fs/file cache-dir "dev"))
(str (fs/file cache-dir "prod"))))]
(assoc opts :cache-dir cache-dir)))
(if (:cache-dir-final opts)
opts
(let [cache-dir (:cache-dir opts)
cache-dir (when cache-dir
(if (:watch opts)
(str (fs/file cache-dir "dev"))
(str (fs/file cache-dir "prod"))))]
(assoc opts :cache-dir cache-dir :cache-dir-final true))))

(defn- update-opts [opts]
(-> opts
Expand Down Expand Up @@ -612,9 +614,9 @@
(let [{:keys [assets-dir assets-out-dir posts-dir templates-dir]
:as opts}
(-> opts
apply-default-opts
(assoc :watch (format "<script type=\"text/javascript\" src=\"%s\"></script>"
lib/live-reload-script))
apply-default-opts
render)]
(reset! posts-cache (:posts opts))
(serve opts false)
Expand Down

0 comments on commit d00e14b

Please sign in to comment.