cms: check the domain of a MediaWiki website in robots.txt using a variable

I have a website (built with MediaWiki 1.33.0 CMS) that contains a robots.txt case file.
In that file there is a line that contains the literal domain of that site:

Sitemap: https://example.com/sitemap/sitemap-index-example.com.xml

Usually, I prefer to replace literal domain references with a variable value call that in some way (depending on the specific case) will be changed in execution to the value that is the domain itself.

An example of a VVC would be a Bash variable substitution.


Many CMS have a global policy file that usually contains the website's base address:
In MediaWiki 1.33.0 this file is LocalSettings.php which contains the online base address 32:

$wgServer = "https://example.com";

How could I call this value with a variable value call in robots.txt?
This will help me avoid confusion and malfunction if the domain of the website is changed; I wouldn't have to change the value manually there too.