diff --git a/assets/js/search.js b/assets/js/search.js index 56ce1b0..f124d58 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -35,6 +35,7 @@ const removeMarkdown = ( .replace(/<[^>]*>/g, '') .replace(/^[=\-]{2,}\s*$/g, '') .replace(/\[\^.+?\](\: .*?$)?/g, '') + .replace(/(#{1,6})\s+(.+)\1?/g, '$2') .replace(/\s{0,2}\[.*?\]: .*?$/g, '') .replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? '$1' : '') .replace(/\[(.*?)\][\[\(].*?[\]\)]/g, '$1') @@ -143,7 +144,7 @@ const removeMarkdown = ( // SPA navigation window.navigate( new URL( - `${BASE_URL.slice(0, -1)}${id}#:~:text=${encodeURIComponent(term)}/` + `${BASE_URL}${id}#:~:text=${encodeURIComponent(term)}/` ), '.singlePage' ) diff --git a/data/config.yaml b/data/config.yaml index e33c329..afa531c 100644 --- a/data/config.yaml +++ b/data/config.yaml @@ -3,6 +3,7 @@ enableToc: true openToc: false enableLinkPreview: true enableLatex: true +enableSPA: false description: Host your second brain and digital garden for free. Quartz features extremely fast full-text search, Wikilink support, backlinks, local graph, tags, and link previews. diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html index deb82e8..e42351a 100644 --- a/layouts/partials/backlinks.html +++ b/layouts/partials/backlinks.html @@ -10,6 +10,7 @@ {{$cleanedInbound := apply (apply $inbound "index" "." "source") "replace" "." " " "-"}} {{- range $cleanedInbound | uniq -}} {{$l := printf "%s%s/" $host .}} + {{$l = cond (eq $l "//") "/" $l}} {{with (index $contentTable .)}}