Skip to content

Commit

Permalink
More tweaks on tw config
Browse files Browse the repository at this point in the history
  • Loading branch information
zampino committed Oct 19, 2023
1 parent 8a2fa1b commit 3cf9148
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion notebooks/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The helper `clerk/doc-url` allows to reference notebooks by path. We currently s

```clojure
(clerk/html
[:ol.bg-lime-500
[:ol.bg-lime-600
[:li [:a {:href (clerk/doc-url 'nextjournal.clerk.home)} "Home"]]
[:li [:a {:href (clerk/doc-url "notebooks/viewers/html")} "HTML"]]
[:li [:a {:href (clerk/doc-url "notebooks/viewers/image")} "Images"]]
Expand Down
5 changes: 4 additions & 1 deletion resources/stylesheets/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module.exports = {
darkMode: "class",
content: ["**.{txt,md,clj,cljc,cljs}"],
content: ["index.clj", "book.clj",
"notebooks/**.{md,clj,cljc,txt}",
"src/**/*.{clj,cljc,cljs}",
"tw/**.{md,clj,cljc,cljs,txt}"],
safelist: ['dark'],
theme: {
extend: {},
Expand Down
9 changes: 3 additions & 6 deletions src/nextjournal/clerk/render/hashing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@
(str (djv/file-set-hash base-dir (file-set base-dir)))))
#_(front-end-hash)

(def git-set
(try (set (map fs/absolutize (clojure.string/split-lines (:out (sh "git ls")))))
(catch Exception _ any?)))

(defn clerk-sources+notebooks-hash []
(let [base-dir (get-base-dir)]
(str (djv/file-set-hash base-dir (filter git-set (fs/glob base-dir "**.{clj,cljc,cljs,md}"))))))
(str (djv/file-set-hash base-dir (fs/glob base-dir "**.{clj,cljc,cljs,md}")))))

#_(clerk-sources+notebooks-hash)

Expand All @@ -69,7 +65,8 @@
"--input" (str (resource-path "stylesheets/viewer.css"))
"--config" (str (resource-path "stylesheets/tailwind.config.js"))
"--output" dest-file
"--minify")))
"--minify"))
(println (format "Compiled CSS (size: %s)" (count (slurp dest-file)))))

#_ (compile-css! "compiled-viewer.css")

Expand Down

0 comments on commit 3cf9148

Please sign in to comment.