@sean ive been trying to find a good answer to this for years.. there arent many options, tikiwiki seems to be the closest. you also have gitlab which has a wiki aspect to itt on a per project basis. Gitlab is nnice because the wiki also exists as a git repo.
feel free to use QOTO's free gitlab instance for your wiki if that is an appropriate solution for you. I dont think it has templating or anything fancy though.