Installing and running Pagefind
Pagefind is a static binary with no dynamic dependencies, so in most cases will be simple to install and run. Pagefind is currently supported on Windows, macOS, and Linux distributions.
#Running via npx
For users with a NodeJS toolchain already installed, Pagefind publishes a wrapper package through npm:
npx pagefind --site "public"
This package includes the correct binary of the relevant release as a dependency for your platform.
Specific versions can be run by passing a version tag:
npx pagefind@latest --site "public"
npx pagefind@v1.1.1 --site "public"
Running Pagefind via npx will always download the pagefind_extended
release, which includes specialized support for indexing Chinese and Japanese pages.
Pagefind’s npm package can also be imported and controlled from a script. See the Node API documentation for details.
#Running via Python
For users with a Python toolchain already installed, Pagefind publishes a wrapper package through pypi:
python3 -m pip install 'pagefind[extended]'
python3 -m pagefind --site "public"
This package includes the correct binary of the relevant release as a dependency for your platform.
Specific versions can be installed by passing a version:
python3 -m pip install 'pagefind[extended]==1.1.1'
The above example shows installing the pagefind_extended
release, which includes specialized support for indexing Chinese and Japanese pages.
To install the smaller standard release, run:
python3 -m pip install 'pagefind[bin]'
Pagefind’s Python package can also be imported and controlled from a script. See the Python API documentation for details.
#Downloading a precompiled binary
If you prefer to install Pagefind yourself, you can download a precompiled release from GitHub and run the binary directly:
./pagefind --site "public"
# or
./pagefind_extended --site "public"
Pagefind publishes two releases, pagefind
and pagefind_extended
. The extended release is a larger binary, but includes specialized support for indexing Chinese and Japanese pages.
#Building from source
If you have Rust and Cargo installed, you can run cargo install pagefind
to build from source.
cargo install pagefind
pagefind --site "public"
To build and install the extended version of Pagefind:
cargo install pagefind --features extended
pagefind --site "public"