Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using cargo install #2218

Merged
merged 1 commit into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/content/documentation/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,13 @@ Zola does not work in PowerShell ISE.
To build Zola from source, you will need to have Git, [Rust and Cargo](https://www.rust-lang.org/)
installed.

From a terminal, you can now run the following command:
From a terminal, you can now run the following commands:

```sh
$ cargo build --release
$ git clone https://github.com/getzola/zola.git
$ cd zola
$ cargo install --path .
$ zola --version
```

If you encountered compilation errors like `error: failed to run custom build command for 'ring v0.16.20'`, you can try the command below instead:
Expand All @@ -212,5 +215,10 @@ $ cargo build --release --no-default-features --features=native-tls
```

The binary will be available in the `target/release` directory. You can move it in your `$PATH` to have the
`zola` command available globally or in a directory if you want for example to have the binary in the
same repository as the site.
`zola` command available globally:

```sh
$ cp target/release/zola ~/.cargo/bin/zola
```

or in a directory if you want for example to have the binary in the same repository as the site.