You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

installation.md 2.0KB

6 years ago
6 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. +++
  2. title = "Installation"
  3. weight = 10
  4. +++
  5. Zola provides pre-built binaries for MacOS, Linux and Windows on the
  6. [GitHub release page](https://github.com/getzola/zola/releases).
  7. ### macOS
  8. Zola is available on [Brew](https://brew.sh):
  9. ```bash
  10. $ brew install zola
  11. ```
  12. ### Arch Linux
  13. Use your favourite AUR helper to install the `zola-bin` package.
  14. ```bash
  15. $ yay -S zola-bin
  16. ```
  17. ### Fedora
  18. Zola has been available in the official repositories since Fedora 29.
  19. ```sh
  20. $ sudo dnf install zola
  21. ```
  22. ### FreeBSD
  23. Zola is available in the official package repository.
  24. ```sh
  25. $ pkg install zola
  26. ```
  27. ### Snapcraft
  28. Zola is available on snapcraft:
  29. ```bash
  30. $ snap install --edge zola
  31. ```
  32. ## Windows
  33. Zola is available on [Scoop](http://scoop.sh):
  34. ```bash
  35. $ scoop install zola
  36. ```
  37. and [Chocolatey](https://chocolatey.org/):
  38. ```bash
  39. $ choco install zola
  40. ```
  41. Zola does not work in PowerShell ISE.
  42. ## From source
  43. To build Zola from source, you will need to have Git, [Rust (at least 1.36) and Cargo](https://www.rust-lang.org/)
  44. installed. You will also need to meet additional dependencies to compile [libsass](https://github.com/sass/libsass):
  45. - OSX, Linux and other Unix-like operating systems: `make` (`gmake` on BSDs), `g++`, `libssl-dev`
  46. - NixOS: Create a `shell.nix` file in the root of the cloned project with the following contents:
  47. ```nix
  48. with import <nixpkgs> {};
  49. pkgs.mkShell {
  50. buildInputs = [
  51. libsass
  52. openssl
  53. pkgconfig
  54. ];
  55. }
  56. ```
  57. - Then, invoke `nix-shell`. This opens a shell with the above dependencies. Then, run `cargo build --release` to build the project.
  58. - Windows (a bit trickier): updated `MSVC` and overall updated VS installation
  59. From a terminal, you can now run the following command:
  60. ```bash
  61. $ cargo build --release
  62. ```
  63. The binary will be available in the `target/release` directory. You can move it in your `$PATH` to have the
  64. `zola` command available globally or in a directory if you want for example to have the binary in the
  65. same repository as the site.