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

Small output inconsistency depending on whether content/_index.md exists #995

Closed
pkgw opened this issue Apr 15, 2020 · 1 comment
Closed
Labels
bug done in pr Already done in a PR

Comments

@pkgw
Copy link

pkgw commented Apr 15, 2020

Bug Report

Environment

Zola version: 0.10.1

Expected Behavior

When processing the site index, the current_path variable should always be "/". Unless it should always be "".

Current Behavior

If content/_index.md exists, when the index.html template is processed the value of current_path will be "/". If content/_index.md does not exist, current_path is the empty string.

Step to reproduce

  • Create a site
  • Write an index.html template that exposes the value of current_path
  • Examine the HTML generated depending on whether content/_index.md exists

Notes

I would expect that current_path should be the same regardless. But maybe there is a good reason that it's not?

@Keats
Copy link
Collaborator

Keats commented Apr 15, 2020

It's an oversight, that will be fixed in the next release. Thanks for that!

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