It's one of the neat features of the AsciiDoc language. The user is able to change captions mid document, in this case :figure-caption:. AsciiDoc and Antora are things I've invested a lot of my time into

https://baiyibai-antora.gitlab.io