mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 03:26:22 +00:00
fix: append trailing slash, fixes #111
This commit is contained in:
parent
f05ff5e62d
commit
3c7ece5405
3 changed files with 3 additions and 3 deletions
|
@ -127,7 +127,7 @@ async function drawGraph(url, baseUrl, pathColors, depth, enableDrag, enableLege
|
|||
.attr("fill", color)
|
||||
.style("cursor", "pointer")
|
||||
.on("click", (_, d) => {
|
||||
window.location.href = baseUrl + '/' + decodeURI(d.id).replace(/\s+/g, '-')
|
||||
window.location.href = `${baseUrl}/${decodeURI(d.id).replace(/\s+/g, '-')}/`
|
||||
})
|
||||
.on("mouseover", function(_, d) {
|
||||
d3.selectAll(".node")
|
||||
|
|
|
@ -131,7 +131,7 @@ const removeMarkdown = (
|
|||
}
|
||||
|
||||
const redir = (id, term) => {
|
||||
window.location.href = BASE_URL + `${id}#:~:text=${encodeURIComponent(term)}`
|
||||
window.location.href = `${BASE_URL}${id}#:~:text=${encodeURIComponent(term)}/`
|
||||
}
|
||||
|
||||
const formatForDisplay = id => ({
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{if $inbound}}
|
||||
{{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}}
|
||||
{{- range $cleanedInbound | uniq -}}
|
||||
{{$l := printf "%s%s" $host .}}
|
||||
{{$l := printf "%s%s/" $host .}}
|
||||
{{with (index $contentTable .)}}
|
||||
<li>
|
||||
<a href="{{$l}}">{{index (index . "title")}}</a>
|
||||
|
|
Loading…
Reference in a new issue