In 1999, front end templates were written in an internally developed macro language named catsubst and served by a C (maybe C++?) application named Obidos. Later (starting in 2003-ish), front end code was written in Perl (Mason) and served by another application named Gurupa. The transition to Gurupa was very long and arduous. I've no idea how the site works now.
Calling it an "internally developed macro language" is stretching it a little bit. It was an extremely simple blob of C++ code that scanned text looking for one of a very small number of known placeholders, and filled them in with the relevant value (session ID, user name, user email etc.) I suppose that over the years between 1996, the capabilities of catsubst may have been expanded somewhat, but certainly when it started there was no formal concept of it being a macro language. In fact, at the very beginning, we experimented with just using m4 (which is a formal macro language) but it wasn't quite right for the job.