Hello!
I’ve been making a little utility function that would create a template with pages that have a specific tag on them and order them by date of creation. That is finally working after a day or so of tinkering, but I also wanted to add a heading above the template in markdown and I can’t seem to find any way of doing it in Space Lua. I don’t know much Space Lua or Lua in general, so I may just be missing something that’s very easy.
This is the function I’m working on:
sl = sl or {}
sl.taggedPagesTemplate = function(tag)
return template.each(
query[[
from index.tag(tag)
order by created
]],
templates.pageItem
)
end
So, in essence, what I’d like it to do is first display a heading in markdown and then render the template:
Heading
- [[page1]]
- [[page2]]
Any help is greatly appreciated!