From c86bf137800d67d347a5ef4e6beba8245676b644 Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Thu, 22 Feb 2024 11:37:50 +0100 Subject: [PATCH] Improve output for readability --- README.md | 2 +- src/class-plugin.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 94b0c88..db36a77 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ If you're developing on this plugin, you will probably want to run tests and lin The default output of this plugin is as follows: ```txt -# This site is very specific about who it allows crawling from. Our default is you're not allowed to crawl: +# This site is very specific about who it allows crawling from. Our default is to not allow crawling: User-agent: * Disallow: / diff --git a/src/class-plugin.php b/src/class-plugin.php index 4b3581d..c12b7e2 100644 --- a/src/class-plugin.php +++ b/src/class-plugin.php @@ -60,12 +60,14 @@ public function modify_robots_txt( $output, $site_public ) { return "User-agent: *\nDisallow: /\n"; } - $robots_txt = "# This site is very specific about who it allows crawling from. Our default is you're not allowed to crawl:\n"; + $robots_txt = "# This site is very specific about who it allows crawling from.\n"; + $robots_txt .= "# Our default is to not allow crawling:\n"; $robots_txt .= "User-agent: *\n"; $robots_txt .= "Disallow: /\n"; $robots_txt .= "\n# Below are the crawlers that are allowed to crawl this site.\n"; - $robots_txt .= "# Below that list, you'll find paths that are blocked, even for them, and then paths within those blocked paths that are allowed.\n"; + $robots_txt .= "# Below that list, you'll find paths that are blocked, even for them,\n"; + $robots_txt .= "# and then paths within those blocked paths that are allowed.\n"; foreach ( $this->get_allowed_spiders() as $crawler ) { $robots_txt .= "User-agent: $crawler\n"; }