Skip to content

Commit 0e2dc04

Browse files
authored
Merge pull request #5 from jamiepratt/codex/revert-personal-clay-config
Restore the standard Clay preview workflow
2 parents 64d807d + 95619cb commit 0e2dc04

4 files changed

Lines changed: 2 additions & 81 deletions

File tree

clay.edn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{:base-target-path "temp"
22
:base-source-path "src"
3-
:watch-dirs ["src"]
4-
:format [:quarto :html]
5-
:run-quarto true
6-
:browse false
73
:quarto-target-path "site"
84
:quarto ^:replace {}
95
:subdirs-to-sync ["src"]

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
:aliases
9292
{;; Build the site with `clojure -M:clay -A:markdown`
9393
;; Run Clay in watch mode with `clojure -M:clay`
94-
:clay {:main-opts ["-m" "civitas.clay-main"]
94+
:clay {:main-opts ["-m" "scicloj.clay.v2.main"]
9595
:jvm-opts ["-Dclojure.main.report=stderr"
9696
"--add-opens=java.base/java.nio=ALL-UNNAMED"]}
9797
;; When debugging libraries

src/civitas/clay_main.clj

Lines changed: 0 additions & 55 deletions
This file was deleted.

src/civitas/db.clj

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
(:require [clojure.edn :as edn]
44
[clojure.pprint :as pprint]
55
[clojure.walk :as walk]
6-
[scicloj.kindly.v4.api :as kindly]
76
[tablecloth.api :as tc]
87
[clj-yaml.core :as yaml]))
98

@@ -41,29 +40,10 @@
4140
(->> (index-by :id))
4241
(update-vals #(dissoc % :id))))
4342

44-
(defn- ns-clay-config [ns-form]
45-
(let [[_ sym ?doc ?attr] ns-form]
46-
(kindly/deep-merge
47-
(some-> ns-form meta :clay)
48-
(some-> sym meta :clay)
49-
(:clay (cond
50-
(map? ?doc) ?doc
51-
(map? ?attr) ?attr)))))
52-
53-
(defn- restore-replaced-quarto-config [config]
54-
(let [quarto (:quarto config)
55-
ns-quarto (some-> config :ns-form ns-clay-config :quarto)]
56-
(if (and ns-quarto (-> quarto meta :replace))
57-
(assoc config :quarto
58-
(kindly/deep-merge ns-quarto (with-meta quarto nil)))
59-
config)))
60-
6143
(defn expand-authors
6244
"Hook for Clay to update ns metadata configuration"
6345
[config]
64-
(-> config
65-
restore-replaced-quarto-config
66-
(update :quarto #(walk/prewalk-replace (author-replacements) %))))
46+
(update config :quarto #(walk/prewalk-replace (author-replacements) %)))
6747

6848
;; TODO: what if the front matter doesn't match existing?
6949

0 commit comments

Comments
 (0)