Getting Content In Headers

What I’m trying to do

I have a bunch of files with various headers. In a separate file, I want to get every file that has a specific header, and then display the contents that is under that header.

The idea is I’m basically making my own wiki for books that I read. I have a file for each character and I list a bunch of different things. One of which is the notable relationships a character has with other characters. So I have a header called “Relationships”. I wanted a file that compiles all of the relationships from all of the characters.

Things I have tried

I had found another thread where someone was doing something extremely similar, but they had lists in their files. So someone gave them this query:

list L.text
where file.lists flatten file.lists as L
where meta(L.section).subpath = "Relationships"
and contains(file.path, "Characters")

This works perfectly fine if I have a list under the header. But for some reason, I can’t wrap my head around getting this to work when there isn’t a list, because I’m not formatting my stuff to have lists.

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