Skip to content

Commit de2186a

Browse files
committed
Try to fix relative links
1 parent c0b56ff commit de2186a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/nextjournal/clerk/render.cljs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -861,9 +861,7 @@
861861
(let [path (.-pathname url)
862862
edn-path (str path (when (str/ends-with? path "/") "index") ".edn")]
863863
(.pushState js/history #js {:edn_path edn-path} ""
864-
(str (cond-> path
865-
(not (str/ends-with? path "/"))
866-
(str "/")) (.-hash url))) ;; a trailing slash is needed to make relative paths work
864+
(str path (.-hash url)))
867865
(fetch+set-state edn-path)))))
868866

869867
(defn load->fetch [{:keys [current-path]} _e]

0 commit comments

Comments
 (0)