cloudflare / cloudflare/cloudflare-docs

Zola for Cloudflare Pages documentation out of date

Open
#31,604 4 comments 1 reaction 3 assignees Claimed by @MattieTK View on GitHub
content:edit documentation product:pages stale
Dominant language
MDX
Stars
5.2k
Forks
16.7k
Avg merge
2d 6h
Merged PRs (30d)
337

Description

### Existing documentation URL(s)

- https://developers.cloudflare.com/pages/framework-guides/deploy-a-zola-site/

### What changes are you suggesting?

I attempted to follow the guide fairly exactly, and I'm getting build failures. There are a few specific problems.

## The [Deploy Section](https://developers.cloudflare.com/pages/framework-guides/deploy-a-zola-site/#deploy-with-cloudflare-pages) is out of date

### Configuration Options

The documentation lists options like:

Configuration option | Value
-- | --
Production branch | main
Build command | zola build
Build directory | public

While the current build configurations showing in worker settings are:
```
Build command:zola build
Deploy command:npx wrangler deploy
Version command:npx wrangler versions upload
Root directory:/
```
### ZOLA_VERSION seems inoperative

Does this flag still actually bring a zola executable into the environment? Even using `ZOLA_VERSION=0.19.2` just like in the docs seems to do nothing. Because...

## The build environment does not seem to include the zola executable

If the zola framework is still supported for pages, then there's some sensitivity to troubleshoot because the build isn't figuring out that it needs zola. I'm not yet sure what the fix is, but I'd recommend adding troubleshooting section.

When I do try to run the worker, I get log output like:
```
22:10:43.875 Initializing build environment...
22:10:45.778 Success: Finished initializing build environment
22:10:46.493 Cloning repository...
22:10:48.573 No build output detected to cache. Skipping.
22:10:48.573 No dependencies detected to cache. Skipping.
22:10:48.575 Detected the following tools from environment:
22:10:48.873 Executing user build command: zola build
22:10:48.876 /bin/sh: 1: zola: not found
22:10:48.879 Failed: error occurred while running build command
```

On the off chance that the build environment is trying (and failing) to figure out that I'm in a zola project, my project structure is:

```
ben@Benjamins-MacBook-Pro homepage % ls -1
AGENTS.md
content
LICENSE
Makefile
public
sass
specs
static
templates
tests
themes
zola.toml
```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.