getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
12.96k stars 919 forks source link

Can't build on v0.19.0: Read-only file system #2533

Closed welpo closed 1 week ago

welpo commented 1 week ago

Bug Report

Environment

Zola version: v0.19.0

Expected Behavior

zola build works just like it did in v0.18.0.

Current Behavior

zola build fails:

$ zola build
Building site...
Checking all internal links with anchors.
> Successfully checked 56 internal link(s) with anchors.
-> Creating 51 pages (0 orphan) and 14 sections
Error: Failed to build the site
Error: Failed to create folder /blog/2
Error: Reason: Read-only file system (os error 30)

The error remains the same even when using -o public. (The error with RUST_BACKTRACE=1 looks identical.)

I've tried changing paginate_by = 5 of the blog section to a large number. The error remains, except now for folder /blog/1.

Step to reproduce

git clone https://github.com/welpo/tabi.git -b v0.19.x
cd tabi
zola build

If relevant, I'm on macOS ARM. I've looked at the changelog but couldn't find anything related to this.

Keats commented 1 week ago

I can reproduce it.

Keats commented 1 week ago

Ok so the issue is that the repo is using paginate_path = "/" and paginate_path = "/blog" and the / messes up the final path building. I'm not entirely sure why it was working before though. Were the paginated pages built at the right location wiht 0.18?

paginate_path should not have a slash as it's only meant to change default name of the paginated paths (eg instead of blog/page/1 you could set paginate_path = "pagina" and get blog/pagina/1)

welpo commented 1 week ago

Thanks for taking a look.

Were the paginated pages built at the right location wiht 0.18?

I was using path for 0.18. When I tried to build with 0.19 I got this error:

Error: Reason: TOML parse error at line 3, column 1
  |
3 | path = "/blog"
  | ^^^^
unknown field `path`, expected one of `title`, `description`, `sort_by`, `weight`, `draft`, `template`, `paginate_by`, `paginate_reversed`, `paginate_path`, `insert_anchor_links`, `render`, `redirect_to`, `in_search_index`, `transparent`, `page_template`, `aliases`, `generate_feeds`, `extra`

paginate_path was the one that looked most similar to path. I assumed the variables had been renamed and switch them up.

If I keep the paginate_path, it indeed breaks with 0.18.

My mistake was using path for sections, right? (And later renaming that to paginate_path) The site builds as expected on both 0.18 and 0.19 if I drop the path and paginate_path variables.


In summary:

This last change indeed breaks for 0.18 and 0.19. My conclusion is I was using a useless variable before, and broke it trying to fix the build for 0.19.