mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-21 19:29:03 -05:00
fix: give the home page a descriptive title
This commit is contained in:
1 parent
e56621de42
commit
d5dd16dbdb
2 files changed
+13
-1
No files matched your search
@@ -1187,7 +1187,9 @@ def _browser_title(relative: Path, title: str) -> str:
|
||||
"""Return a concise, unique browser/search title for a generated page."""
|
||||
key = relative.as_posix()
|
||||
index_titles = {
|
||||
"index.md": SITE_NAME,
|
||||
# Material appends " - RetroBIOS": the home title says what the site
|
||||
# is, instead of "RetroBIOS - RetroBIOS".
|
||||
"index.md": "BIOS and firmware packs for RetroArch, Batocera and more",
|
||||
"platforms/index.md": "Platforms",
|
||||
"systems/index.md": "Systems",
|
||||
"emulators/index.md": "Emulators",
|
||||
|
||||
@@ -232,5 +232,15 @@ class TheSitemapIsAnnouncedWhereCrawlersLook(unittest.TestCase):
|
||||
self.assertNotIn("Sitemap: https://", source)
|
||||
|
||||
|
||||
|
||||
class TheHomeTitleSaysWhatTheSiteIs(unittest.TestCase):
|
||||
def test_not_the_site_name_twice(self):
|
||||
from generate_site import SITE_NAME, _browser_title
|
||||
|
||||
title = _browser_title(Path("index.md"), SITE_NAME)
|
||||
self.assertNotEqual(title, SITE_NAME)
|
||||
self.assertIn("BIOS", title)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user