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

zettel build fail with error but doesn't show what yaml is invalid #22

Open
gleb108 opened this issue Sep 21, 2020 · 5 comments
Open

zettel build fail with error but doesn't show what yaml is invalid #22

gleb108 opened this issue Sep 21, 2020 · 5 comments
Labels
enhancement New feature or request hacktoberfest

Comments

@gleb108
Copy link

gleb108 commented Sep 21, 2020

test$ zettel --verbose build
DEBU[2020-09-21T11:43:14+03:00] verbose logging enabled
INFO[2020-09-21T11:43:14+03:00] Starting zettel...
2020/09/21 11:43:14 reading config: zettel.toml
2020/09/21 11:43:14 error while yaml unmarshal: yaml: line 3: mapping values are not allowed in this context
ERRO[2020-09-21T11:43:14+03:00] OOPS: yaml: line 3: mapping values are not allowed in this context

I'd like to know what exactly yaml file cause this error but zettel doesn't show this information.

@mr-karan
Copy link
Contributor

Can you show your zettel.toml?

@mr-karan mr-karan added the bug Something isn't working label Sep 21, 2020
@gleb108
Copy link
Author

gleb108 commented Sep 21, 2020

Sure. zettel.toml was created with zettel init command
test$ cat zettel.toml description = "Hello World. This is my zettel notebook" site_name = "My Zettel"

@iamd3vil
Copy link
Contributor

I think this might be because there is invalid yaml in the frontmatter in one of your posts. Can you just post an example of any of your .md files? @gleb108

@gleb108
Copy link
Author

gleb108 commented Sep 21, 2020

I understand that yaml can be wrong. My point is: zettel should inform me what yaml file is invalid? It should show the filename and maybe the line, not just line number.

My yaml was created by vim+vim-zettel plugin and looks like:

`

title: sometitle
date: 2020-09-16 16:53
tags: tag1:tag2:tag-three:

= Sometitle =

bla-bla-bla

Backlink:
link

`

@iamd3vil
Copy link
Contributor

The tags in the front matter should be a array of strings like ["tag1", "tag2"]. I got your point about showing the error though.

@iamd3vil iamd3vil added enhancement New feature or request and removed bug Something isn't working labels Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants