Index of pages without a specified tag

I have added this example because I cannot see an equivalent in the documentation for Lua template queries. I also have a few questions:

  • I feel I could be missing a more elegant way to display an index of pages (with tags) not tagged “meta” etc?
  • How can I add a custom CSS class to the resulting list or a parent block?
  • Is there a recommended way to render the tags as links rather than plain text (via table.concat) which is the current output?
${template.each(query[[
select{
    name = p.name,
    modified = p.lastModified,
    tags = p.tags
  }
from p = index.tag "page"  
where not table.includes(p.tags, "meta")
]], 
template.new[==[
    * [[${name}]] ${table.concat(tags, ",")}
    ]==]
)}
1 Like