From 83c2b0808c4bb677e4d9bb421a78709ec4fd445a Mon Sep 17 00:00:00 2001 From: Liam Bigelow <40188355+bglw@users.noreply.github.com> Date: Sat, 2 Jul 2022 13:18:25 +1200 Subject: [PATCH] Add installation docs --- docs/content/docs/config-options.md | 2 +- docs/content/docs/config-sources.md | 2 +- docs/content/docs/installation.md | 44 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 docs/content/docs/installation.md diff --git a/docs/content/docs/config-options.md b/docs/content/docs/config-options.md index a7609fab..5a567a66 100644 --- a/docs/content/docs/config-options.md +++ b/docs/content/docs/config-options.md @@ -2,7 +2,7 @@ date: 2022-06-01 title: "Configuring the Pagefind CLI" nav_title: "Configuration options" -nav_section: CLI configuration +nav_section: Running Pagefind weight: 51 --- diff --git a/docs/content/docs/config-sources.md b/docs/content/docs/config-sources.md index aca94030..3614870e 100644 --- a/docs/content/docs/config-sources.md +++ b/docs/content/docs/config-sources.md @@ -2,7 +2,7 @@ date: 2022-06-01 title: "Pagefind CLI configuration sources" nav_title: "Configuration sources" -nav_section: CLI configuration +nav_section: Running Pagefind weight: 50 --- diff --git a/docs/content/docs/installation.md b/docs/content/docs/installation.md new file mode 100644 index 00000000..f72d891e --- /dev/null +++ b/docs/content/docs/installation.md @@ -0,0 +1,44 @@ +--- +date: 2022-06-01 +title: "Installing and running Pagefind" +nav_title: "Installation" +nav_section: Running Pagefind +weight: 49 +--- + +Pagefind is a static binary with no dynamic dependencies, so in most cases will be simple to install and run. + +> Pagefind does not yet have a prebult Windows binary available. + +## Running via npx + +```bash +npx pagefind --source "public" +``` + +Pagefind publishes a [wrapper package through npm](https://www.npmjs.com/package/pagefind), which is the easiest way to get started. This package will download the correct [binary of the latest release](https://github.com/CloudCannon/pagefind/releases) from GitHub for your platform and run it. + +Specific versions can be run by passing a version tag: + +```bash +npx pagefind@latest --source "public" + +npx pagefind@v0.2.0 --source "public" +``` + +## Downloading a precompiled binary + +If you prefer to install Pagefind yourself, you can download a [precompiled release from GitHub](https://github.com/CloudCannon/pagefind/releases) and run the binary directly: + +```bash +./pagefind --source "public" +``` + +## Building from source + +If you have [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) installed, you can run `cargo install pagefind` to build from source. + +```bash +cargo install pagefind +pagefind --source "public" +``` \ No newline at end of file