Skip to content

Commit

Permalink
Fix doc-url relative paths on index
Browse files Browse the repository at this point in the history
  • Loading branch information
zampino committed Jul 25, 2023
1 parent 894b7f8 commit f0b033b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nextjournal/clerk/viewer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,9 @@

#?(:clj
(defn relative-root-prefix-from [path]
(str "./" (str/join (repeat (inc (get (frequencies (str path)) \/ 0))
"../")))))
(str "./" (when (not= "index.clj" path)
(str/join (repeat (inc (get (frequencies (str path)) \/ 0))
"../"))))))

#?(:clj
(defn map-index [{:as _opts :keys [index]} path]
Expand Down

0 comments on commit f0b033b

Please sign in to comment.