Skip to content

Commit 3f64df2

Browse files
committed
Updates local build to include search
Signed-off-by: Chris Abraham <[email protected]>
1 parent c618470 commit 3f64df2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ resources/
44
node_modules/
55
.hugo_build.lock
66
.DS_Store
7+
pagefind
78

89
# Local Netlify folder
910
.netlify

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ git submodule update --init --recursive
5050
npm install
5151
```
5252

53-
You can then run the site using `npm run serve` (select "[Hugo]").
53+
You can then run the site using `npm run serve` (select "[Hugo]"). To have the site run locally with a functioning local search, run `npm run serve:with-pagefind`.
5454

5555
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=cncf/glossary)

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "none.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"serve": "netlify dev -c \"hugo serve --minify -DFE -w\""
8+
"serve": "netlify dev -c \"hugo serve --minify -DFE -w\"",
9+
"serve:with-pagefind": "hugo --baseURL=/ --theme=docsy && npm_config_yes=true npx pagefind --site 'public' --output-subdir '../static/pagefind' && npm run serve"
910
},
1011
"repository": {
1112
"type": "git",

0 commit comments

Comments
 (0)