Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build website when there's an index.md file in level 1 directory in content #2101

Closed
kamoshi opened this issue Feb 16, 2023 · 10 comments
Closed
Labels

Comments

@kamoshi
Copy link

kamoshi commented Feb 16, 2023

Bug Report

Environment

Zola version: v0.17.0 (Linux)

Expected Behavior

When we have a content directory of the following structure:

content
| _index.md
| hello.md
| world.md
> subdir
   | index.md
   | asset.png

The site should build normally and there should be a single page located at /subdir/.

Current Behavior

The site fails to be built with the following error:

Error: Failed to build the site
Error: We can't have a page called `index.md` in the same folder as an index section in "/home/user/zola-site/content"

Step to reproduce

  1. Create a website which has a subdirectory inside content and add index.md page into that subdirectory.
  2. Try building the website with zola serve
@lukehsiao
Copy link
Contributor

Running into this same issue. This seems to be the recommended structure for asset colocation as well: https://www.getzola.org/documentation/content/overview/

@Keats
Copy link
Collaborator

Keats commented Feb 16, 2023

This is weird, the https://github.com/getzola/zola/tree/master/docs/content/documentation/content directory has the same structure with the image-processing folder and it builds fine?
I probably didn't handle the root content directory properly :/

@Keats Keats added the bug label Feb 16, 2023
@kamoshi
Copy link
Author

kamoshi commented Feb 16, 2023

Yeah, the problem exists only specifically for the subdirectories which exist directly in content root. If there's index.md file in any deeper subdirectories, the website builds just fine

@Keats
Copy link
Collaborator

Keats commented Feb 16, 2023

Yep I see the issue, even fixing it reveals another issue :/
I'm adding tests and fixing it

Keats added a commit that referenced this issue Feb 16, 2023
@Keats
Copy link
Collaborator

Keats commented Feb 16, 2023

The next branch should fix it i think

bors bot pushed a commit to bevyengine/bevy-website that referenced this issue Feb 21, 2023
Zola 0.17 breaks our "valid" file structure. For now we can just hard code the previous build.

getzola/zola#2101
bors bot pushed a commit to bevyengine/bevy-website that referenced this issue Feb 21, 2023
Zola 0.17 breaks our "valid" file structure. For now we can just hard code the previous build.

getzola/zola#2101
@timharek
Copy link

When can we expect that #2103 will released @Keats?

@Keats
Copy link
Collaborator

Keats commented Feb 23, 2023

Today or tomorrow, just waiting to see if there are more bugs coming up

@notthewave
Copy link

notthewave commented Jun 23, 2023

I'm still getting this error even with 0.17.2. It builds fine with 016.2.

but within a level 2 dir

@Keats
Copy link
Collaborator

Keats commented Jun 23, 2023

Can you past the tree output or link to a repository?

@rimutaka
Copy link

rimutaka commented Jul 23, 2024

I get this error in 0.19.1 after opening an old project with just one file that used to work fine.

- content
-- index.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants