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

"content/index.md" results in two identical pages #2082

Closed
Elinvynia opened this issue Jan 21, 2023 · 3 comments
Closed

"content/index.md" results in two identical pages #2082

Elinvynia opened this issue Jan 21, 2023 · 3 comments
Labels
bug done in pr Already done in a PR

Comments

@Elinvynia
Copy link

Bug Report

Environment

Zola version: 0.16.1

Expected Behavior

$base_url/content/ should not exist

Current Behavior

$base_url/content/ is created and is a duplicate of $base_url/

Step to reproduce

Create a file named index.md in folder named content, give it a template, generate the site and watch the page be duplicated.
(both public/index.html and public/content/index.html exist)

@Keats Keats added the bug label Jan 22, 2023
Keats added a commit that referenced this issue Jan 22, 2023
@Keats
Copy link
Collaborator

Keats commented Jan 22, 2023

It should be fixed in the next branch! It will now be an error to have a file named index.md in a section folder, it will be reserved for colocated assets directories.

I think I might end up allowing it before the next version release but I'm 100% sure, I might have been focused on removing the error vs thinking on how it would work.

@Elinvynia
Copy link
Author

Thanks a lot, at first I was confused since I didn't have any content/_index.md but after renaming content/index.md to content/_index.md the issue was resolved!

@Keats
Copy link
Collaborator

Keats commented Jan 23, 2023

Yep we automatically create some _index.md at the root of the content if there isn't one just so you actually have a homepage.

@Keats Keats added the done in pr Already done in a PR label Jan 24, 2023
@Keats Keats closed this as completed in ee4cbb6 Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done in pr Already done in a PR
Projects
None yet
Development

No branches or pull requests

2 participants