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

Missing front matter results in an ugly panic message #1327

Closed
jplatte opened this issue Jan 29, 2021 · 2 comments
Closed

Missing front matter results in an ugly panic message #1327

jplatte opened this issue Jan 29, 2021 · 2 comments
Labels
bug done in pr Already done in a PR

Comments

@jplatte
Copy link
Contributor

jplatte commented Jan 29, 2021

Bug Report

Trying to zola serve a site where one of the pages is missing frontmatter (in my case because I hadn't saved the file yet) results in an ugly panic message instead of an easy to read error message like most other error conditions.

Environment

Zola version: 0.13.0

Expected Behavior

An easier to read error message should be produced, and zola serve should not exit, instead retrying when the file changes.

Current Behavior

thread 'main' panicked at 'error deserialising page: Error { kind: Msg("Couldn\'t find front matter in `/home/jplatte/Projekte/blog.turbo.fish/content/proc-macro-intro.md`. Did you forget to add `+++` or `---`?"), source: None }', components/site/src/lib.rs:264:22

Step to reproduce

  • Create a site with an empty .md file in content
  • Run zola serve
@Keats
Copy link
Collaborator

Keats commented Jan 29, 2021

Looks like there is an expect instead of a ?

@Keats Keats added the bug label Jan 29, 2021
@Keats Keats added the done in pr Already done in a PR label Feb 2, 2021
@brycewray
Copy link

@Keats Thanks for fixing this. I’ve been trying to use your “First Steps with Zola” tutorial on https://www.getzola.org/documentation/getting-started/overview/ and kept running into this problem. Am looking forward to seeing the release with the fix.

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

3 participants