Keyword in text file


(Sang) #1

Matrix Version: 5.5.1.3

In robot.txt file, I am trying to write global keyword here like

SITEMAP: https://www.test.co.nz/sitemap.xml

to

SITEMAP: %globals_site_url%/sitemap.xml

Then I can just clone the text file to the different projects without change.

Any way to implement like this?

I did by creating standard page asset with blank design. Is this way ok as well?


(Bart Banda) #2

You would have to change your robots.txt file from a file asset to a standard page and then use the raw html content type to put the robots info into.

Then you’d need a Design applied to the standard page that uses the text/plain content type header (https://matrix.squiz.net/manuals/designs/chapters/global-variables#content-type) so that the page serves as a file on the frontend.