diff --git a/tests/test_site_nav.py b/tests/test_site_nav.py
index 7dc611aff..871631ea1 100644
--- a/tests/test_site_nav.py
+++ b/tests/test_site_nav.py
@@ -396,7 +396,7 @@ class _Page(HTMLParser):
def handle_endtag(self, tag: str) -> None:
if tag == "nav" and self._crumbs:
self._crumbs = 0
- if tag == "div" and self._pagination and not self.pagination:
+ if tag == "nav" and self._pagination and not self.pagination:
self._pagination = False
if self._text is not None and tag in ("a", "summary"):
self.sidebar.append(" ".join("".join(self._text).split()))
@@ -621,7 +621,7 @@ def _html(url: str) -> str:
def _pagination(text: str) -> tuple[str | None, str | None]:
- start = text.find('
')
+ page = read(html, article_only=True)
+ self.assertEqual(page.glued, [])
+ self.assertEqual(page.text, "Previous A Next B")
+ self.assertTrue(read(html.replace("Previous
", "Previous
"), article_only=True).glued)
+
+
class ThePickerWaitsForItsScript(unittest.TestCase):
def test_hidden_until_the_setups_are_listed(self):
source = (WEBSITE / "src" / "components" / "FilePicker.astro").read_text(encoding="utf-8")
diff --git a/website/astro.config.mjs b/website/astro.config.mjs
index 81b74bf95..4b7fd50db 100644
--- a/website/astro.config.mjs
+++ b/website/astro.config.mjs
@@ -105,6 +105,7 @@ export default defineConfig({
PageTitle: './src/components/PageTitle.astro',
MarkdownContent: './src/components/MarkdownContent.astro',
Footer: './src/components/Footer.astro',
+ Pagination: './src/components/Pagination.astro',
Header: './src/components/Header.astro',
Search: './src/components/Search.astro',
},
diff --git a/website/src/components/Pagination.astro b/website/src/components/Pagination.astro
new file mode 100644
index 000000000..809c225b6
--- /dev/null
+++ b/website/src/components/Pagination.astro
@@ -0,0 +1,87 @@
+---
+// Starlight's previous and next links (its Pagination.astro, 0.42), with a
+// space after the word: the line break alone left "PreviousWhat the packs
+// do not hold" in the page text a copy, a crawler or an assistant reads.
+// Each link is named by its direction and its page, and the pair is a
+// navigation landmark.
+import { Icon } from '@astrojs/starlight/components';
+
+const { dir, pagination } = Astro.locals.starlightRoute;
+const { prev, next } = pagination;
+const isRtl = dir === 'rtl';
+const previousWord = Astro.locals.t('page.previousLink');
+const nextWord = Astro.locals.t('page.nextLink');
+---
+
+
+
+