chore: display page aliases

This commit is contained in:
Tienson Qin
2020-11-10 23:01:06 +08:00
parent 6575812f1b
commit 74402fce1d

View File

@@ -354,6 +354,15 @@
:href (str "/file/" (util/url-encode file-path))}
file-path]])]
(when (and repo (not block?))
(let [alias (db/get-page-alias-names repo page-name)]
(when (seq alias)
[:div.text-sm.ml-1.mb-4 {:key "page-file"}
[:span.opacity-50 "Alias: "]
(for [item alias]
[:a.ml-1.mr-1 {:href (str "/page/" (util/encode-str item))}
item])])))
(when (and block? (not sidebar?))
[:div.mb-4
(block/block-parents repo block-id format)])