mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-20 10:23:16 -05:00
fix: announce the sitemap from each page
This commit is contained in:
1 parent
6c50e29dfa
commit
e56621de42
3 files changed
+23
-6
No files matched your search
@@ -217,5 +217,20 @@ class TheTestingGuideNamesEveryModule(unittest.TestCase):
|
||||
self.assertEqual(missing, [])
|
||||
|
||||
|
||||
|
||||
class TheSitemapIsAnnouncedWhereCrawlersLook(unittest.TestCase):
|
||||
"""robots.txt was published as /retrobios/robots.txt, which no crawler
|
||||
reads (RFC 9309 reads the host root): the sitemap it announced was
|
||||
never found that way."""
|
||||
|
||||
def test_the_head_names_it_and_no_robots_is_written(self):
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
override = (root / "docs_assets" / "overrides" / "main.html").read_text()
|
||||
self.assertIn('rel="sitemap"', override)
|
||||
source = (root / "scripts" / "generate_site.py").read_text()
|
||||
self.assertNotIn('"robots.txt"),\n "User-agent', source)
|
||||
self.assertNotIn("Sitemap: https://", source)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user