YAML not working properly

Things I have tried

For some reason my YAML is not changing when I enter the preview mode. Nothing changes between edit and preview mode when there should pop a “window” for the YAML. Also, I’m not able to use the dataview because it doesn’t recognize the frontmatter.

Here is an example of the YAML in one of the notes. Some of it was added manually and some with the Media DB plugin with templates.

---
aliases: teste
cover: { { VALUE:Poster } }
director:    
genre: [[Animation]], [[Crime]], [[Drama]]  
imdbId: tt0877057  
ratingImdb: 9.0  
rating:  
year: 2006–2007  
cast: [[Mamoru Miyano]], [[Brad Swaile]], [[Vincent Tong]]  
type: anime
OP: the world
ED:
favorite: yes
---

This is the template that I use:

---
aliases:
cover: { { VALUE:Poster } }
director: {{VALUE:directorLink}}  
genre: {{VALUE:genreLinks}}  
imdbId: {{VALUE:imdbID}}  
ratingImdb: {{VALUE:imdbRating}}  
rating:  
year: {{VALUE:Year}}  
cast: {{VALUE:actorLinks}}  
type: anime
OP:
ED:
favorite:
---

Please help I already read the documentation and really don’t know where I’m making a mistake.

Maybe you need to review the way you write a list/array of links. (and the links)

I tried making a new page without links and lists to test this but it was no good

My point is related with the “invalid yaml”.
About the edit and the preview, what you mean?
Are you talking about the Live Preview or the Reading View?

Does this YAML work?

---
aliases: teste
cover: { { VALUE:Poster } }
director:    
genre: 
  - "[[Animation]]"
  - "[[Crime]]"
  - "[[Drama]]"
imdbId: tt0877057  
ratingImdb: 9.0  
rating:  
year: 2006–2007  
cast:
  - "[[Mamoru Miyano]]"
  - "[[Brad Swaile]]"
  - "[[Vincent Tong]]"  
type: anime
OP: the world
ED:
favorite: yes
---

1 Like

I’m in live preview mode, the problem is that my view of the YAML “window” is not changing from the edit mode to the live preview mode and therefore I’m not getting the error message.

That worked! The problem was really in the lists syntax. Thanks for the help!

1 Like

Hi zenrik,

I’m happy your problem was solved.

In the future, it might by helpful to know the different ways lists can be created. This website shows the different ways…

1 Like

Live Preview is a middle place between the edit mode and the final render (personally I hate LP :slight_smile: ).
To hide the frontmatter block I think you need to use the reading view.

1 Like

Yes, I noticed that yesterday, tunrs out that there was no problem, it was just me being stupid haha. Thanks for the help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.