Skip to content

Commit

Permalink
feat: add seo steps pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
thedaviddias committed Feb 10, 2025
1 parent e08ce5a commit 91f900f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
43 changes: 43 additions & 0 deletions app/_components/seo/steps-pagination.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
export function StepsPagination() {
const schema = {
"@context": "https://schema.org",
"@type": "HowTo",
"name": "How to Implement Pagination",
"description": "Learn how to implement pagination in web applications with best practices for SEO, accessibility, and performance.",
"step": [
{
"@type": "HowToStep",
"name": "Wrap pagination controls in a container",
"text": "Use a <nav> or <div> element to enclose pagination links.",
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#anatomy"
},
{
"@type": "HowToStep",
"name": "Ensure numbered page links are clickable",
"text": "Provide interactive <a> or <button> elements for each page.",
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#best-practices"
},
{
"@type": "HowToStep",
"name": "Highlight the current page",
"text": "Use aria-current='page' and visual styling to indicate the active page.",
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#accessibility"
},
{
"@type": "HowToStep",
"name": "Optimize pagination for SEO",
"text": "Use canonical tags, clean URLs, and prevent duplicate content issues.",
"url": "https://uxpatterns.dev/en/patterns/navigation/pagination#seo"
}
]
}

return (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
)
}


3 changes: 3 additions & 0 deletions content/en/patterns/navigation/pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ status: complete
import { BrowserSupport } from "@app/_components/browser-support";
import { BuildEffort } from "@app/_components/build-effort";
import { FaqStructuredData } from "@app/_components/faq-structured-data";
import { StepsPagination } from "@app/_components/seo/steps-pagination.tsx";

<StepsPagination />

# Pagination

Expand Down

0 comments on commit 91f900f

Please sign in to comment.