Right now we are returning a default robots.txt file:
Even though we want to provide a Frontity package to configure the robots.txt file using the Frontity settings in the future, it’d be great to be able to configure it using a file in your root directory as well, similar to what we are doing for the favicon.ico.
User Stories
As a Frontity project developer
I want to use a robots.txt file
so that I can get control of my robots easily
Possible solution
I guess we have to check if the file exists first. If it does return it and if it doesn’t, return the default string like we are doing right now.
You can now add the robots.txt file at the root of your theme (next to the frontity.settings.js file) and when you build and deploy your app for production, it will be automatically picked up by the Frontity server and served at https://your-site-url.xyx/robots.txt.