Robots.txt template

I’m overriding the default robots.txt and wanted to include a set of files that are generated elsewhere. Since robots.txt is a template, I was hoping to just use Tera’s {% include "" %} as one would in any template, except I get an error:

Error: Failed to render 'robots.txt'
Error: Reason: Template '[]' not found

If I change the include and rename the file to .html instead of .txt, it seems to work. Is Tera not able to include non-html files? How does the robots.txt template work with .txt extension? Is this intended behaviour or a bug?


Tera can, but Zola only loads html files currently.

I was trying to trace this through the code and wasn’t understanding, but now I notice load_tera specifically looks for *.*ml and *.md, and robots.txt if it exists.

Is there any reason only these files are loaded as templates? Would a PR be welcome to expand this list or add configuration option with list of additional file patterns/extensions?

I think adding txt to that list is fine