Query frontmatter variable

Hi Guys! I just started with silverbullet this week. Love the concept and I’m ready to eat the learning curve! :slight_smile:

I want to “get” pages that are relevant to a topic of mine. I have “notities” (notes) and projecten (projects). I want to show notities that are relates to the project.

I have a notitie with frontmatter:

tags: notitie
project: bob

and I have a project called BOB where I’d like to list these and more notities. This query works:

${query[[
from p = index.tag "notitie"
select { title="[["..p.name.."]]", project=p.project}
]]}

But, when I want to add a filter to only show notities that have the project “bob”, my query fails.

${query[[
from p = index.tag "notitie"
where p.project = "bob"
select { title="[["..p.name.."]]", project=p.project}
]]}

Any word of advice or a better way to do this?

Hi Jeroen,

Welcome. You should use p.project == "bob"