Skip to content

Commit

Permalink
Add installation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Jul 2, 2022
1 parent da2cf53 commit 83c2b08
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/content/docs/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/config-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---

Expand Down
44 changes: 44 additions & 0 deletions docs/content/docs/installation.md
Original file line number Diff line number Diff line change
@@ -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 [email protected] --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"
```

0 comments on commit 83c2b08

Please sign in to comment.