fix: append trailing slash, fixes #111
| | |
| | | .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") |
| | |
| | | } |
| | | |
| | | 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 => ({ |
| | |
| | | {{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> |