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, ",")}
    ]==]
)}

i know it’s been a while but i stumbled uppon your post searching for something else.
here is the answer or a workaround for your 3rd question regarding the tags.
not the most elegant way of doing things but it work, i will just leave this here to someone who might be asking the same:

${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")
limit 10
]], 
template.new[==[
    * [[${name}]] ${tags and #tags >0 and "#" .. table.concat(tags," #") or ""}
    ]==]
)}

this will give you a list with clickable pages and tags:

Great - thanks for that!