diff --git a/resources/views/bot.blade.php b/resources/views/bot.blade.php new file mode 100644 index 0000000..4859039 --- /dev/null +++ b/resources/views/bot.blade.php @@ -0,0 +1,60 @@ + +
+

About TroveBot

+ +

+ Trove is a federated search engine for the small web, + seeded by fediverse attention and ranked by domain coherence rather than + commercial authority. TroveBot is its crawler — it + discovers and indexes URLs shared by people on the fediverse, then + follows the citations they make to find more of the small web. +

+ +

Identity

+ +

TroveBot identifies itself with the following User-Agent string:

+ +
TroveBot/0.1 (+https://trove.lvl0.xyz/bot)
+ +

Crawling behavior

+ + + +

Opt out

+ +

+ Block TroveBot entirely by adding the following to your site's + robots.txt: +

+ +
User-agent: TroveBot
+Disallow: /
+ +

+ Or block specific paths: +

+ +
User-agent: TroveBot
+Disallow: /private/
+Disallow: /admin/
+ +

Contact & source

+ + +
+
diff --git a/routes/web.php b/routes/web.php index 5f96afc..6199875 100644 --- a/routes/web.php +++ b/routes/web.php @@ -9,3 +9,5 @@ }); Route::view('/submit', 'urls.submit'); + +Route::view('/bot', 'bot'); diff --git a/tests/Feature/BotPageTest.php b/tests/Feature/BotPageTest.php new file mode 100644 index 0000000..e544b00 --- /dev/null +++ b/tests/Feature/BotPageTest.php @@ -0,0 +1,39 @@ +get('/bot'); + + $response->assertStatus(200); + } + + public function test_bot_page_contains_user_agent_string(): void + { + $response = $this->get('/bot'); + + $response->assertSee('TroveBot/0.1 (+https://trove.lvl0.xyz/bot)', escape: false); + } + + public function test_bot_page_contains_robots_txt_opt_out_example(): void + { + $response = $this->get('/bot'); + + $response->assertSee('User-agent: TroveBot', escape: false); + $response->assertSee('Disallow: /', escape: false); + } + + public function test_bot_page_links_to_forge_repository(): void + { + $response = $this->get('/bot'); + + $response->assertSee('https://forge.lvl0.xyz/lvl0/trove', escape: false); + } +}