Skip to content

Commit 91f900f

Browse files
committed
feat: add seo steps pagination
1 parent e08ce5a commit 91f900f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
export function StepsPagination() {
2+
const schema = {
3+
"@context": "https://schema.org",
4+
"@type": "HowTo",
5+
"name": "How to Implement Pagination",
6+
"description": "Learn how to implement pagination in web applications with best practices for SEO, accessibility, and performance.",
7+
"step": [
8+
{
9+
"@type": "HowToStep",
10+
"name": "Wrap pagination controls in a container",
11+
"text": "Use a <nav> or <div> element to enclose pagination links.",
12+
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#anatomy"
13+
},
14+
{
15+
"@type": "HowToStep",
16+
"name": "Ensure numbered page links are clickable",
17+
"text": "Provide interactive <a> or <button> elements for each page.",
18+
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#best-practices"
19+
},
20+
{
21+
"@type": "HowToStep",
22+
"name": "Highlight the current page",
23+
"text": "Use aria-current='page' and visual styling to indicate the active page.",
24+
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#accessibility"
25+
},
26+
{
27+
"@type": "HowToStep",
28+
"name": "Optimize pagination for SEO",
29+
"text": "Use canonical tags, clean URLs, and prevent duplicate content issues.",
30+
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#seo"
31+
}
32+
]
33+
}
34+
35+
return (
36+
<script
37+
type="application/ld+json"
38+
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
39+
/>
40+
)
41+
}
42+
43+

content/en/patterns/navigation/pagination.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ status: complete
88
import { BrowserSupport } from "@app/_components/browser-support";
99
import { BuildEffort } from "@app/_components/build-effort";
1010
import { FaqStructuredData } from "@app/_components/faq-structured-data";
11+
import { StepsPagination } from "@app/_components/seo/steps-pagination.tsx";
12+
13+
<StepsPagination />
1114

1215
# Pagination
1316

0 commit comments

Comments
 (0)