Getting the metadata to work

I am having trouble getting the metadata to work at the top of the page. Whatever I do, the metadata still shows but does not work. Obvious something I haven’t learned yet.

What I’m trying to do

What I want to do is create a dashboard following the instructions from here

Things I have tried

What I have done so far
created and added a dashboard.css to myvault/.obsidian/snippets/dashboard.css
activated the dashboard.css snippet
opened a new note and added my content
I put the metadata at the top right after the title
I turned off Show Inline Title

I tried using three dashes — but ended up with horizontal lines
I tried putting a backslash in front -– which got rid of the horizontal lines but the metadata is still not working.
I have now tried three ticks ``` . Still no good.

What an I doing wrong?

Screenshot 2024-07-09 171129
Screenshot 2024-07-09 171219

you need to use dashes for yaml header, not ticks.

like: this


  • Type --- at the very beginning of a file.

Line one; first character.


thank you for replying. As I said in the message that just creates horizontal lines

the dashes have to be the very first things in the document. you may have some characters appearing before them. I have in the past sometimes had examples not work when I pasted in from a site as it included some unwanted invisible stuff. It’s worth looking at the document in source mode to verify what’s going on.

just opened a brand new note
at the very top I typed three dashes, went to next line to add cssclass: and it turned to a horizontal line.
I am at the top of the note (apart from the note title which is now hidden. Inactivated show inline title)

not sure what else to say

One thing to check is your keyboard layout, international settings, and/or your OS text replacement settings. Make sure you are actually inputting --- and not other characters. Your OS may be changing --- to an en – dash, em — dash, or similar (though I’m not sure those would create a horizontal rule/line).

in settings > editor> properties in document, what it your setting?

I have mine in “source” mode.
I also have show line numbers on. It may be worth verifying the document really is starting from line 1.

other than that, I’d consider creating a clean new markdown document externally and pasting into your structure with a simple yaml header in it.

to verify the yaml is working, you can also add

  - foo

and then search for the tag #foo to see if the document shows up


It’s working now.
I created a new vault - TestVault, and it works. the difference I noticed was when adding the metadata it showed Properties which made it easy to add the cssclass

On the original vault it doesn’t show that.

I had the two vaults side by side and looked for any differences. Apart from the plugins they were pretty much the same. I cancelled the plugins. The only other thing I changed was inactivate Readable line length.

The original vault is now working. I’m not sure why.

Why would one vault have metadata — and the other show Properties?

Thanks for your help. It’s an enjoyable learning curve :slightly_smiling_face:

1 Like

weird! glad you got there in the end. hopefully that’s as mystifying as it gets for a while