How can I get a list of all the YAML fields from "Current File"?

Things I have tried

I searched “list yaml by dataview” in help docs and found an answer but that is listing all the YAML keywords my whole Vault.

I also tried:

```dataview
list file.frontmatter from [[<% tp.file.title %>]]```

But this doesn’t show anything

What I’m trying to do

I have made a folder for habit tracking and everyday I make a page there that contains all the metadata in the YAML area that I use to make Heat Map Charts in other pages.

What I want is that, to view all the metadata from that YAML area even in reading mode in the particular file itself (Only Keys or Both Key: Value → please give both answers because as far as I know “frontmatter” is only Keys that is useful too in my case but what to do if anyone wants values too). So after this I will not have to switch between editing and reading mode again and again to view whole YAML if I need to.

Thanks for the answer.

I found an answer to this by myself:

```dataview
list file.frontmatter where file.path = this.file.path```

hope it will help if anyone is wanting this.

1 Like

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