Skip to content

Commit

Permalink
Netlify support is back!
Browse files Browse the repository at this point in the history
  • Loading branch information
Keats committed May 9, 2019
1 parent b29596c commit 7337b38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in the `docs/content` folder of the repository and the community can use [its fo
| Search | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) |
| Data files | ![yes](./is-yes.svg) | ![yes](./is-yes.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |
| LiveReload | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![yes](./is-yes.svg) |
| Netlify support | ![ehh](./is-ehh.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |
| Netlify support | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |
| Breadcrumbs | ![yes](./is-yes.svg) | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) |
| Custom output formats | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |

Expand Down
24 changes: 7 additions & 17 deletions docs/content/documentation/deployment/netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,16 @@ with no effort. This very site is hosted by Netlify and automatically deployed o

If you don't have an account with Netlify, you can [sign up](https://app.netlify.com) for one.

Netlify has built-in support for the older version (named Gutenberg) but not for Zola yet.

## Automatic Deploys (*Gutenberg only*)

> Automatic deploys based on environment variable are not available for Zola yet,
> only for version <= 0.4.2 when it was called Gutenberg
## Automatic Deploys

Once you are in the admin interface, you can add a site from a Git provider (GitHub, GitLab or Bitbucket). At the end
of this process, you can select the deploy settings for the project:

- build command: `GUTENBERG_VERSION=0.4.2 gutenberg build` (replace the version number in the variable by the version you want to use)
- build command: `ZOLA_VERSION=0.7.0 zola build` (replace the version number in the variable by the version you want to use)
- publish directory: the path to where the `public` directory is

With this setup, your site should be automatically deployed on every commit on master. For `GUTENBERG_VERSION`, you may
With this setup, your site should be automatically deployed on every commit on master. For `ZOLA_VERSION`, you may
use any of the tagged `release` versions in the GitHub repository — Netlify will automatically fetch the tagged version
and use it to build your site.

Expand All @@ -32,31 +28,25 @@ the admin interface.

```toml
[build]
# assuming the Gutenberg site is in a docs folder, if it isn't you don't need
# assuming the Zola site is in a docs folder, if it isn't you don't need
# to have a `base` variable but you do need the `publish` and `command`
base = "docs"
publish = "docs/public"
command = "gutenberg build"
command = "zola build"

[build.environment]
# Set the version name that you want to use and Netlify will automatically use it
GUTENBERG_VERSION = "0.5.0"
ZOLA_VERSION = "0.7.0"

# The magic for deploying previews of branches
# We need to override the base url with whatever url Netlify assigns to our
# preview site. We do this using the Netlify environment variable
# `$DEPLOY_PRIME_URL`.

[context.deploy-preview]
command = "gutenberg build --base-url $DEPLOY_PRIME_URL"
command = "zola build --base-url $DEPLOY_PRIME_URL"
```

## Automatic deploys for Zola
Since Netlify doesn't support Zola currently, you will need to download the archive directly from GitHub, replacing the version in the URL with the one you want:

```
command = "curl -sL https://github.com/getzola/zola/releases/download/v0.6.0/zola-v0.6.0-x86_64-unknown-linux-gnu.tar.gz | tar zxv && ./zola build"
```

## Manual Deploys
If you would prefer to use a version of Zola that isn't a tagged release (for example, after having built Zola from
Expand Down

0 comments on commit 7337b38

Please sign in to comment.