Skip to content

Where to put robots.txt? #255

Answered by caendesilva
gphg asked this question in Q&A
May 3, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hey! Thanks for using HydePHP! There is no special way to set up robots.txt files using Blade or similar. There is actually no feature dedicated to handling robots.txt files, but maybe there should be?

Depending on how your site is set up, there are three ways you can add a robots file, let me know if you want further information about any of these:

  1. Create a post-build-task, this can then generate the robots file each time the site is built (for example by copying a file from somewhere else, or just using file_put_contents())
  2. If you have your _site/ directory in version control you can set empty_output_directory in config/hyde.php to true, then Hyde won't empty the _site/ directory and y…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gphg
Comment options

@caendesilva
Comment options

@gphg
Comment options

Answer selected by gphg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants