Skip to content

Commit 902cd8f

Browse files
committed
README: document how to use the configured Pagefind version locally
This can be potentially crucial when trying to debug failures of CI builds that are caused by diverging Pagefind versions. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e53b394 commit 902cd8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ $ HUGO_UGLYURLS=false hugo
9393
$ npx -y pagefind --site public --serve
9494
```
9595

96+
If you want to make sure that the same Pagefind version is used as when the site is deployed, use this command:
97+
98+
```console
99+
$ npx -y pagefind@$(sed -n 's/^ *pagefind_version: //p' <./hugo.yml) --site public
100+
```
101+
96102
Note that running Pagefind will make the process about 7 times slower, and the site will not be re-rendered and live-reloaded in the browser when you change files in `content/` (unlike with `hugo serve -w`).
97103

98104
## Running the test suite

0 commit comments

Comments
 (0)