The main issue is False, Lua is case-sensitive, so boolean literals must be lowercase. You can also simplify the condition using not. Hereβs the corrected query:
${query[[
from index.tag "page"
order by lastModified desc
where not string.startsWith(name, "/meta")
select {
Page = "[[" .. name .. "|" .. (#name > 40 and string.sub(name, 1, 40) .. "..." or name) .. "]]",
Maturity = maturity,
Kind = kind,
Tags = tags,
}
limit 10
]]}
Changes made:
1. where string.startsWith(page, "/meta") = False β where not string.startsWith(name, "/meta")
β’ False is invalid β Lua uses false (lowercase)
β’ Using not is cleaner and more idiomatic than comparing to a boolean
2. kind = kind β Kind = kind β capitalized the key to match the style of the other fields (Page, Maturity, Tags). This is optional but keeps it consistent.
3. Also the attribute page for the page is invalid so you need to use βnameβ So string.startsWith(name,β¦)
4. As far as i know utila is not available so you need to replace that too: with Page = "[[" .. name .. "|" .. (#name > 40 and string.sub(name, 1, 40) .. "..." or name) .. "]]",
If you specifically need the equality comparison style instead of not, the valid form would be:
where string.startsWith(name, "/meta") == false
Note the double == for equality comparison in Lua, not a single =.ββββββββββββββββ
Note that a pagename can never start with /meta, so this query is still not going to work.
If you want to exclude meta pages, it might make more sense to tag meta-pages with #meta.