I like to use .twig
for my templates for easy syntax switching, but it doesn't seem to work when my template requires an extension as part of its name.
For instance:
robots.txt
works finerobots.txt.twig
, doesn't. The matching request is now{siteUrl}/robots.txt.twig
, and I don't get the automaticContent-Type
matching that happens when it is justrobots.txt
.
I figure this just isn't currently supported, but I would be nice!
robots.txt
, because it has to be accessible from/robots.txt
. So to userobots.twig
you'd have to set up a route. And with the.txt
in the template name, you get thecontent-type
header automatically set.