Netlify support is back!

This commit is contained in:
Vincent Prouillet 2019-05-09 09:23:17 -07:00
parent b29596c3cc
commit 7337b38b96
2 changed files with 8 additions and 18 deletions

View file

@ -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) | | 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) | | 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) | | 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) | | 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) | | Custom output formats | ![no](./is-no.svg) | ![no](./is-no.svg) | ![yes](./is-yes.svg) | ![no](./is-no.svg) |

View file

@ -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. 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
> Automatic deploys based on environment variable are not available for Zola yet,
> only for version <= 0.4.2 when it was called Gutenberg
Once you are in the admin interface, you can add a site from a Git provider (GitHub, GitLab or Bitbucket). At the end 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: 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 - 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 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. and use it to build your site.
@ -32,15 +28,15 @@ the admin interface.
```toml ```toml
[build] [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` # to have a `base` variable but you do need the `publish` and `command`
base = "docs" base = "docs"
publish = "docs/public" publish = "docs/public"
command = "gutenberg build" command = "zola build"
[build.environment] [build.environment]
# Set the version name that you want to use and Netlify will automatically use it # 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 # The magic for deploying previews of branches
# We need to override the base url with whatever url Netlify assigns to our # We need to override the base url with whatever url Netlify assigns to our
@ -48,15 +44,9 @@ GUTENBERG_VERSION = "0.5.0"
# `$DEPLOY_PRIME_URL`. # `$DEPLOY_PRIME_URL`.
[context.deploy-preview] [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 ## 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 If you would prefer to use a version of Zola that isn't a tagged release (for example, after having built Zola from