zettel
zettel copied to clipboard
zettel build fail with error but doesn't show what yaml is invalid
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.
Can you show your zettel.toml?
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"
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
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
`
The tags in the front matter should be a array of strings like ["tag1", "tag2"]. I got your point about showing the error though.