Board Thread:Support Requests - Getting Technical/@comment-31246436-20161104134036/@comment-1757994-20161104164827

If you want to query for a specific, known category, you can use the Scribunto library function  to get a list of pages in the category, then check to see if the current page is in the list returned.

Lua could also retrieve the contents of the page and try to parse it for things that look like, but that would be unreliable. For example, this post contains that string, but it's enclosed in, so it's not in the category. Alternatively, categories could be added by templates, so they'd be missed.

JavaScript would be cleaner, since there's an API for that (action=query & prop=categories). Depending how you intend to use category membership, js may or may not meet your needs.