Skip to content

Commit

Permalink
using the qmd extension again (to support css chunks)
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed Oct 13, 2023
1 parent 01f90be commit ab48cf4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/scicloj/clay/v2/server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@
(defn write-quarto! [items]
(let [qmd-path

(ns->target-path "docs/" *ns* "_quarto.md")
(ns->target-path "docs/" *ns* "_quarto.qmd")
html-path (-> qmd-path
(string/replace #"\.md$" ".html"))]
(string/replace #"\.qmd$" ".html"))]

(io/make-parents qmd-path)
;; (-> @*state
Expand Down Expand Up @@ -251,7 +251,7 @@ format:
book:
title: \"book\"
chapters:
- index.md
- index.qmd
")

(def base-quarto-index
Expand All @@ -265,7 +265,7 @@ embed-resources: true
")

(defn update-quarto-config! [chapter-path]
(let [index-path "book/index.md"
(let [index-path "book/index.qmd"
config-path "book/_quarto.yml"
current-config (if (-> config-path io/file .exists)
(slurp config-path)
Expand Down Expand Up @@ -294,8 +294,8 @@ embed-resources: true
(string/split #"\.")
last
(= "index"))
(ns->target-path "" *ns* ".md")
(ns->target-path "" *ns* "/index.md"))
(ns->target-path "" *ns* ".qmd")
(ns->target-path "" *ns* "/index.qmd"))
qmd-path (str "book/" chapter-path)]
(io/make-parents qmd-path)
(-> @*state
Expand Down

0 comments on commit ab48cf4

Please sign in to comment.