Today I was trying to implement Ezoic in a project and among other things they have the need for an ads.txt
file at the root of the site. No problems there, however, during the setup they require us to create an HTTP redirection and even provide examples with PHP, Nginx etc.
The farthest I managed to replicate this with Hugo was with Custom Templates and a <meta http-equiv="refresh"/>
tag, but that wouldn’t output a TXT. And by using uglyUrl
the output file would be a TXT but the <meta>
wouldn’t work, after al, it’s a TXT.
Then I’ve found this topic and following the GitHub Issues Tracker I’ve found this issue that, apparently, would allow me to accomplish my goal using resources.Get
but with the fragment provided in the last comments of said issue (I can’t repost here because of the temporary 2 links limit), results in an error:
error calling Get: CreateFile <ABSOLUTE_PATH_TO_MY_THEME_FOLDER><URL>: The filename, directory name, or volume label syntax is incorrect
So, is this implemented yet? If not, is there an alternative?