Skip to content

Commit 390b204

Browse files
authored
Merge pull request #915 from InessaPawson/searchbox-pagefind
ENH: enable site search with pagefind
2 parents 1757c3f + d1297cd commit 390b204

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎.github/workflows/gh-pages.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
export PATH=$(pwd)/dart-sass:$PATH
6161
hugo --gc --minify
6262
63+
- name: Build search index
64+
run: npx --yes pagefind@1.5.2 --site public
65+
6366
- name: Deploy pages
6467
uses: JamesIves/github-pages-deploy-action@releases/v4
6568
with:

‎Makefile‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# type `make help` to see all options
1+
# type `make help` to see all options
22

3-
BASEURL ?=
3+
BASEURL ?=
44

55
ifdef BASEURL
66
BASEURLARG=-b $(BASEURL)
7-
endif
7+
endif
88

99
.PHONY: help prepare teams-clean teams serve clean
1010

@@ -41,8 +41,10 @@ serve-dev:
4141
python gen_config.py
4242
hugo $(BASEURLARG) --printI18nWarnings server --buildDrafts --disableFastRender --poll 1000ms
4343

44+
PAGEFIND = npx --yes pagefind@1.5.2 --site public
4445
html: prepare ## build the website in ./public
4546
hugo $(BASEURLARG)
47+
$(PAGEFIND)
4648

4749
clean: ## remove the build artifacts, mainly the "public" directory
4850
rm -rf public

‎config.yaml.in‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ markup:
1414
disableLanguages: []
1515

1616
params:
17+
search: true
1718
colorScheme: light
1819
author:
1920
name: "NumPy team"

0 commit comments

Comments
 (0)