how to get a list of headings ?

Hi there, I was wondering how i could get a list of headings of a page or current page via the lua ql. I’m also failing to get any sort of table of content feature. I simply cloned the repo and built it from source.

template.each(
  query[[from tags.header where _.page == editor.getCurrentPage()]],
  template.new[==[
  * [[${ref}|${name}]]
  ]==]
)

The table of content only shows after a certain amount of headers are present on a page. I think it was three or four, unsure.

1 Like