Skip to content

Commit 0d58716

Browse files
authored
Merge pull request #14 from qonto/fix-engine
Fix search engine
2 parents 351310e + 9010af6 commit 0d58716

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
submodules: recursive
4343
fetch-depth: 0
4444

45+
- name: Patch Hugo book
46+
run: patch -p0 < themes/patch_book.txt
47+
4548
- name: Create public directory
4649
run: mkdir public
4750

themes/patch_book.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--- themes/book/assets/search.js 2023-11-23 16:41:11
2+
+++ themes/book/assets/search.js 2023-11-23 16:41:08
3+
@@ -5,7 +5,7 @@
4+
{{ $searchConfig := i18n "bookSearchConfig" | default "{}" }}
5+
6+
(function () {
7+
- const searchDataURL = '{{ $searchData.RelPermalink }}';
8+
+ const searchDataURL = '{{ $searchData.Permalink }}';
9+
const indexConfig = Object.assign({{ $searchConfig }}, {
10+
doc: {
11+
id: 'id',
12+
--- themes/book/assets/search-data.json 2023-11-23 17:13:03
13+
+++ themes/book/assets/search-data.json 2023-11-23 17:13:08
14+
@@ -8,7 +8,7 @@
15+
{{ range $index, $page := $pages }}
16+
{{ if gt $index 0}},{{end}} {
17+
"id": {{ $index }},
18+
- "href": "{{ $page.RelPermalink }}",
19+
+ "href": "{{ $page.Permalink }}",
20+
"title": {{ (partial "docs/title" $page) | jsonify }},
21+
"section": {{ (partial "docs/title" $page.Parent) | jsonify }},
22+
"content": {{ $page.Plain | jsonify }}

0 commit comments

Comments
 (0)