From 01d9ea7f7a55ae162836244d4af523285898872c Mon Sep 17 00:00:00 2001 From: iyear Date: Sat, 2 Dec 2023 15:14:55 +0800 Subject: [PATCH] fix(search): searchDataURL must not use relative URL --- assets/search-data.json | 2 +- assets/search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/search-data.json b/assets/search-data.json index 0348cbe..caca029 100644 --- a/assets/search-data.json +++ b/assets/search-data.json @@ -8,7 +8,7 @@ {{ range $index, $page := $pages }} {{ if gt $index 0}},{{end}} { "id": {{ $index }}, - "href": "{{ $page.RelPermalink }}", + "href": "{{ $page.Permalink }}", "title": {{ (partial "docs/title" $page) | jsonify }}, "section": {{ (partial "docs/title" $page.Parent) | jsonify }}, "content": {{ $page.Plain | jsonify }} diff --git a/assets/search.js b/assets/search.js index 2d75fee..b9b5b56 100644 --- a/assets/search.js +++ b/assets/search.js @@ -5,7 +5,7 @@ {{ $searchConfig := i18n "bookSearchConfig" | default "{}" }} (function () { - const searchDataURL = '{{ $searchData.RelPermalink }}'; + const searchDataURL = '{{ $searchData.Permalink }}'; const indexConfig = Object.assign({{ $searchConfig }}, { doc: { id: 'id',