mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-06-27 23:10:22 +08:00
Merge branch 'main' into feat/pagination
This commit is contained in:
commit
f20de48e1a
916
SEO.md
Normal file
916
SEO.md
Normal file
@ -0,0 +1,916 @@
|
||||
# Dashboard Icons SEO Audit 2025
|
||||
|
||||
## Overview
|
||||
|
||||
This document presents a comprehensive SEO audit for the Dashboard Icons website built with Next.js 15.3. The audit analyzes current implementation and provides detailed recommendations based on the latest Next.js best practices for optimal search engine visibility and performance.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Current Implementation Assessment](#current-implementation-assessment)
|
||||
- [Metadata Implementation](#metadata-implementation)
|
||||
- [SEO Optimization Checklist](#seo-optimization-checklist)
|
||||
- [Technical SEO](#technical-seo)
|
||||
- [Performance Optimization](#performance-optimization)
|
||||
- [Content and User Experience](#content-and-user-experience)
|
||||
- [Mobile Optimization](#mobile-optimization)
|
||||
- [Advanced Next.js 15.3 SEO Features](#advanced-nextjs-153-seo-features)
|
||||
- [Recommendations](#recommendations)
|
||||
- [Conclusion](#conclusion)
|
||||
- [References](#references)
|
||||
|
||||
## Current Implementation Assessment
|
||||
|
||||
The Dashboard Icons project currently implements several good SEO practices:
|
||||
|
||||
- [x] Basic metadata configuration in layout.tsx and page.tsx files
|
||||
- [x] Dynamic title and description generation with appropriate keyword inclusion
|
||||
- [x] Open Graph tags for social sharing with proper image dimensions
|
||||
- [x] Twitter Card metadata implementation for social visibility
|
||||
- [x] Proper use of semantic HTML elements for content structure
|
||||
- [x] Server-side rendering for improved indexing and crawler access
|
||||
- [x] Canonical URLs properly configured across page types
|
||||
- [x] Image optimization with next/image component for improved Core Web Vitals
|
||||
|
||||
However, there are several opportunities for improvement:
|
||||
|
||||
- [ ] No robots.txt implementation for directing crawler behavior
|
||||
- [ ] Missing XML sitemap for improved content discovery
|
||||
- [ ] No structured data (JSON-LD) for enhanced search results
|
||||
- [ ] Limited use of advanced Next.js 15.3 metadata features
|
||||
- [ ] Missing breadcrumb navigation for enhanced user experience and SEO
|
||||
- [ ] No dynamic OG images for improved social sharing
|
||||
|
||||
## Metadata Implementation
|
||||
|
||||
The project uses Next.js App Router's built-in metadata API effectively across different page types:
|
||||
|
||||
### Root Layout Metadata Analysis
|
||||
|
||||
In `layout.tsx`, the site establishes global metadata that provides a solid foundation:
|
||||
|
||||
```typescript
|
||||
// In layout.tsx
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const { totalIcons } = await getTotalIcons()
|
||||
|
||||
return {
|
||||
metadataBase: new URL(WEB_URL),
|
||||
title: websiteTitle,
|
||||
description: getDescription(totalIcons),
|
||||
keywords: ["dashboard icons", "service icons", "application icons", "tool icons", "web dashboard", "app directory"],
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
googleBot: "index, follow",
|
||||
},
|
||||
openGraph: {
|
||||
siteName: WEB_URL,
|
||||
title: websiteTitle,
|
||||
url: BASE_URL,
|
||||
description: getDescription(totalIcons),
|
||||
images: [
|
||||
{
|
||||
url: "/og-image.png",
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: "Dashboard Icons - Dashboard icons for self hosted services",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: WEB_URL,
|
||||
description: getDescription(totalIcons),
|
||||
images: ["/og-image.png"],
|
||||
},
|
||||
applicationName: WEB_URL,
|
||||
alternates: {
|
||||
canonical: BASE_URL,
|
||||
},
|
||||
// Additional configurations...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Strengths:**
|
||||
- Properly sets metadataBase for all relative URLs
|
||||
- Includes comprehensive metadata for SEO and social sharing
|
||||
- Dynamically generates description based on content (totalIcons)
|
||||
- Properly configures robots directives
|
||||
|
||||
**Areas for improvement:**
|
||||
- The `websiteTitle` ("Free Dashboard Icons - Download High-Quality UI & App Icons") could be more specific
|
||||
- The OpenGraph URL points to BASE_URL (CDN) rather than WEB_URL (the actual site)
|
||||
- Twitter title uses WEB_URL instead of an actual title
|
||||
- Missing locale information for international SEO
|
||||
|
||||
### Page-Specific Metadata Analysis
|
||||
|
||||
For individual icon pages, metadata is comprehensively generated based on icon data:
|
||||
|
||||
```typescript
|
||||
// In [icon]/page.tsx
|
||||
export async function generateMetadata({ params, searchParams }: Props, parent: ResolvingMetadata): Promise<Metadata> {
|
||||
const { icon } = await params
|
||||
const iconsData = await getAllIcons()
|
||||
// ...processing code...
|
||||
const formattedIconName = icon
|
||||
.split("-")
|
||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(" ")
|
||||
|
||||
return {
|
||||
title: `${formattedIconName} Icon | Dashboard Icons`,
|
||||
description: `Download the ${formattedIconName} icon in SVG, PNG, and WEBP formats for FREE. Part of a collection of ${totalIcons} curated icons...`,
|
||||
openGraph: {
|
||||
title: `${formattedIconName} Icon | Dashboard Icons`,
|
||||
description: `Download the ${formattedIconName} icon in SVG, PNG, and WEBP formats for FREE...`,
|
||||
type: "article",
|
||||
url: pageUrl,
|
||||
authors: [authorName],
|
||||
publishedTime: updateDate.toISOString(),
|
||||
modifiedTime: updateDate.toISOString(),
|
||||
section: "Icons",
|
||||
tags: [formattedIconName, "dashboard icon", "service icon", ...],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
title: `${formattedIconName} Icon | Dashboard Icons`,
|
||||
description: `Download the ${formattedIconName} icon...`,
|
||||
images: [iconImageUrl],
|
||||
},
|
||||
alternates: {
|
||||
canonical: pageUrl,
|
||||
media: {
|
||||
png: iconImageUrl,
|
||||
svg: `${BASE_URL}/svg/${icon}.svg`,
|
||||
webp: `${BASE_URL}/webp/${icon}.webp`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Strengths:**
|
||||
- Excellent dynamic title generation with proper formatting
|
||||
- Comprehensive description with icon-specific information
|
||||
- Proper OpenGraph article configuration with author and timestamp data
|
||||
- Well-structured alternates configuration for different media types
|
||||
- Good keyword inclusion in meta tags
|
||||
|
||||
**Areas for improvement:**
|
||||
- Could benefit from structured data for product/image entity
|
||||
- Could implement dynamic OG images with the ImageResponse API
|
||||
|
||||
### Icons Browse Page Metadata Analysis
|
||||
|
||||
The icons browse page implements specific metadata optimized for its purpose:
|
||||
|
||||
```typescript
|
||||
// In icons/page.tsx
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const icons = await getIconsArray()
|
||||
const totalIcons = icons.length
|
||||
|
||||
return {
|
||||
title: "Browse Icons | Free Dashboard Icons",
|
||||
description: `Search and browse through our collection of ${totalIcons} curated icons for services, applications and tools...`,
|
||||
keywords: [
|
||||
"browse icons",
|
||||
"dashboard icons",
|
||||
"icon search",
|
||||
// ...
|
||||
],
|
||||
openGraph: {
|
||||
title: "Browse Icons | Free Dashboard Icons",
|
||||
description: `Search and browse through our collection of ${totalIcons} curated icons...`,
|
||||
// ...
|
||||
},
|
||||
// Additional configurations...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Strengths:**
|
||||
- Clear, purpose-driven title
|
||||
- Dynamic description that includes the collection size
|
||||
- Relevant keywords for the browse page functionality
|
||||
|
||||
**Areas for improvement:**
|
||||
- Could implement pagination metadata (prev/next) if applicable
|
||||
- Missing structured data for collection/gallery
|
||||
|
||||
## SEO Optimization Checklist
|
||||
|
||||
### Metadata and Head Tags
|
||||
|
||||
- [x] Page titles are unique, descriptive, and include keywords
|
||||
- [x] Meta descriptions are compelling and keyword-rich (under 160 characters)
|
||||
- [x] Open Graph tags are implemented for social sharing
|
||||
- [x] Twitter Card metadata is implemented
|
||||
- [x] Canonical URLs are properly set
|
||||
- [ ] Structured data/JSON-LD for rich snippets
|
||||
- [x] Properly configured viewport meta tag
|
||||
- [x] Favicon and apple-touch-icon are set
|
||||
- [x] Keywords meta tag is implemented (though not as influential for rankings as before)
|
||||
- [ ] Language and locale information (hreflang) for international SEO
|
||||
|
||||
### Indexation and Crawling
|
||||
|
||||
- [x] Server-side rendering for improved indexability
|
||||
- [ ] robots.txt file implementation
|
||||
- [ ] XML sitemap generation
|
||||
- [x] Proper HTTP status codes (200, 404, etc.)
|
||||
- [x] Internal linking structure
|
||||
- [ ] Pagination handling with proper rel="next" and rel="prev" tags
|
||||
- [ ] Implementation of dynamic sitemap with Next.js 15.3 file-based API
|
||||
|
||||
### Content Structure
|
||||
|
||||
- [x] Clean URL structure (`/icons/[icon]`)
|
||||
- [x] Semantic HTML headings (h1, h2, etc.)
|
||||
- [x] Content hierarchy matches visual hierarchy
|
||||
- [ ] Breadcrumb navigation for improved user experience and crawlability
|
||||
- [ ] Schema.org markup for content types
|
||||
|
||||
## Technical SEO
|
||||
|
||||
### Server-side Rendering and Static Generation
|
||||
|
||||
The project effectively uses Next.js App Router to implement:
|
||||
|
||||
- **Static Generation (SSG)** for homepage and catalog pages, providing fast initial load times and improved indexability
|
||||
- **Server-Side Rendering (SSR)** for dynamic content, ensuring fresh content is always accessible to crawlers
|
||||
- **Incremental Static Regeneration (ISR)** potential for optimal performance and content freshness
|
||||
|
||||
These approaches ensure search engines can properly crawl and index content while providing optimal performance.
|
||||
|
||||
### Dynamic Routes Implementation
|
||||
|
||||
Dynamic routes like `/icons/[icon]` are properly implemented with `generateStaticParams` to pre-render paths at build time:
|
||||
|
||||
```typescript
|
||||
export async function generateStaticParams() {
|
||||
const iconsData = await getAllIcons()
|
||||
return Object.keys(iconsData).map((icon) => ({
|
||||
icon,
|
||||
}))
|
||||
}
|
||||
```
|
||||
|
||||
This approach ensures all icon pages are pre-rendered during build time, optimizing both performance and SEO by making all content immediately available to search engine crawlers without requiring JavaScript execution.
|
||||
|
||||
### Missing Critical Components
|
||||
|
||||
#### robots.txt Implementation
|
||||
|
||||
Currently missing a robots.txt file which is essential for directing search engine crawlers. Next.js 15.3 offers a file-based API that should be implemented:
|
||||
|
||||
```typescript
|
||||
// app/robots.ts
|
||||
import { MetadataRoute } from 'next'
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: '*',
|
||||
allow: '/',
|
||||
},
|
||||
sitemap: 'https://dashboardicons.com/sitemap.xml',
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### sitemap.xml Implementation
|
||||
|
||||
No sitemap implementation was found. A sitemap is critical for search engines to discover and index all pages efficiently. Next.js 15.3's file-based API makes this easy to implement:
|
||||
|
||||
```typescript
|
||||
// app/sitemap.ts
|
||||
import { MetadataRoute } from 'next'
|
||||
import { getAllIcons } from '@/lib/api'
|
||||
import { BASE_URL, WEB_URL } from '@/constants'
|
||||
|
||||
export default async function sitemap(): MetadataRoute.Sitemap {
|
||||
const iconsData = await getAllIcons()
|
||||
const lastModified = new Date()
|
||||
|
||||
// Base routes
|
||||
const routes = [
|
||||
{
|
||||
url: WEB_URL,
|
||||
lastModified,
|
||||
changeFrequency: 'weekly',
|
||||
priority: 1.0,
|
||||
},
|
||||
{
|
||||
url: `${WEB_URL}/icons`,
|
||||
lastModified,
|
||||
changeFrequency: 'daily',
|
||||
priority: 0.9,
|
||||
},
|
||||
// Other static routes
|
||||
]
|
||||
|
||||
// Icon routes
|
||||
const iconRoutes = Object.keys(iconsData).map((icon) => ({
|
||||
url: `${WEB_URL}/icons/${icon}`,
|
||||
lastModified: new Date(iconsData[icon].update.timestamp),
|
||||
changeFrequency: 'weekly' as const,
|
||||
priority: 0.7,
|
||||
}))
|
||||
|
||||
return [...routes, ...iconRoutes]
|
||||
}
|
||||
```
|
||||
|
||||
For larger icon collections, Next.js 15.3 supports `generateSitemaps` for creating multiple sitemap files:
|
||||
|
||||
```typescript
|
||||
// app/sitemap.ts
|
||||
export async function generateSitemaps() {
|
||||
const totalIcons = await getTotalIconCount()
|
||||
// Google's limit is 50,000 URLs per sitemap
|
||||
const sitemapsNeeded = Math.ceil(totalIcons / 50000)
|
||||
|
||||
return Array.from({ length: sitemapsNeeded }, (_, i) => ({ id: i }))
|
||||
}
|
||||
|
||||
export default async function sitemap({ id }: { id: number }): Promise<MetadataRoute.Sitemap> {
|
||||
// Fetch icons for this specific sitemap segment
|
||||
// ...implementation
|
||||
}
|
||||
```
|
||||
|
||||
#### JSON-LD Structured Data
|
||||
|
||||
Missing structured data for improved search results appearance. For icon pages, implement ImageObject schema:
|
||||
|
||||
```typescript
|
||||
// In [icon]/page.tsx component
|
||||
import { JsonLd } from 'next-seo';
|
||||
|
||||
// Within component return statement
|
||||
return (
|
||||
<>
|
||||
<JsonLd
|
||||
type="ImageObject"
|
||||
data={{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'ImageObject',
|
||||
name: `${formattedIconName} Icon`,
|
||||
description: `Dashboard icon for ${formattedIconName}`,
|
||||
contentUrl: `${BASE_URL}/png/${icon}.png`,
|
||||
license: 'https://creativecommons.org/licenses/by-sa/4.0/',
|
||||
acquireLicensePage: `${WEB_URL}/icons/${icon}`,
|
||||
creditText: `Dashboard Icons`,
|
||||
creator: {
|
||||
'@type': 'Person',
|
||||
name: authorData.name || authorData.login
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<IconDetails icon={icon} iconData={originalIconData} authorData={authorData} />
|
||||
</>
|
||||
)
|
||||
```
|
||||
|
||||
For the homepage, implement Organization schema:
|
||||
|
||||
```typescript
|
||||
// In layout.tsx or page.tsx
|
||||
import { JsonLd } from 'next-seo';
|
||||
|
||||
// Within component return statement
|
||||
<JsonLd
|
||||
type="Organization"
|
||||
data={{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Organization',
|
||||
name: 'Dashboard Icons',
|
||||
url: WEB_URL,
|
||||
logo: `${WEB_URL}/logo.png`,
|
||||
description: 'Collection of free icons for self-hosted dashboards and services',
|
||||
sameAs: [
|
||||
REPO_PATH,
|
||||
// Social media links if available
|
||||
]
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Core Web Vitals
|
||||
|
||||
Performance is a crucial SEO factor. Current implementation has:
|
||||
|
||||
- [x] Image optimization through next/image (reduces LCP)
|
||||
- [x] Font optimization with the Inter variable font
|
||||
- [ ] Proper lazy loading of below-the-fold content
|
||||
- [ ] Optimized Cumulative Layout Shift (CLS)
|
||||
- [ ] Interaction to Next Paint (INP) optimization
|
||||
|
||||
### Detailed Recommendations
|
||||
|
||||
#### 1. Image Optimization
|
||||
|
||||
- **Priority attribute**: Add priority attribute to critical above-the-fold images:
|
||||
```tsx
|
||||
<Image
|
||||
src="/hero-image.jpg"
|
||||
alt="Dashboard Icons"
|
||||
width={1200}
|
||||
height={630}
|
||||
priority
|
||||
/>
|
||||
```
|
||||
|
||||
- **Size optimization**: Ensure images use appropriate sizes for their display contexts:
|
||||
```tsx
|
||||
<Image
|
||||
src={`${BASE_URL}/png/${icon}.png`}
|
||||
alt={`${formattedIconName} icon`}
|
||||
width={64}
|
||||
height={64}
|
||||
sizes="(max-width: 640px) 32px, (max-width: 1024px) 48px, 64px"
|
||||
/>
|
||||
```
|
||||
|
||||
#### 2. JavaScript Optimization
|
||||
|
||||
- **Use dynamic imports**: Implement dynamic imports for non-critical components:
|
||||
```tsx
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
const IconGrid = dynamic(() => import('@/components/IconGrid'), {
|
||||
loading: () => <p>Loading icons...</p>,
|
||||
})
|
||||
```
|
||||
|
||||
- **Component-level code splitting**: Break large components into smaller, more manageable pieces
|
||||
|
||||
#### 3. Core Web Vitals Focus
|
||||
|
||||
- **LCP Optimization**:
|
||||
- Preload critical resources
|
||||
- Optimize server response time
|
||||
- Prioritize above-the-fold content rendering
|
||||
|
||||
- **CLS Minimization**:
|
||||
- Reserve space for dynamic content
|
||||
- Define explicit width/height for images and embeds
|
||||
- Avoid inserting content above existing content
|
||||
|
||||
- **INP Improvement**:
|
||||
- Optimize event handlers
|
||||
- Use debouncing for input-related events
|
||||
- Avoid long-running JavaScript tasks
|
||||
|
||||
## Content and User Experience
|
||||
|
||||
- [x] Clean, semantic HTML structure
|
||||
- [x] Clear content hierarchy with proper heading tags
|
||||
- [ ] Comprehensive alt text for all images
|
||||
- [x] Mobile-friendly responsive design
|
||||
- [ ] Breadcrumb navigation for improved user experience and SEO
|
||||
- [ ] Related icons section for internal linking and improved user engagement
|
||||
|
||||
### Recommended Content Improvements
|
||||
|
||||
#### Breadcrumb Navigation
|
||||
|
||||
Implement structured breadcrumb navigation with Schema.org markup:
|
||||
|
||||
```tsx
|
||||
// components/Breadcrumbs.tsx
|
||||
import Link from 'next/link'
|
||||
import { JsonLd } from 'next-seo'
|
||||
|
||||
interface BreadcrumbItem {
|
||||
name: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export function Breadcrumbs({ items }: { items: BreadcrumbItem[] }) {
|
||||
return (
|
||||
<>
|
||||
<JsonLd
|
||||
type="BreadcrumbList"
|
||||
data={{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'BreadcrumbList',
|
||||
itemListElement: items.map((item, index) => ({
|
||||
'@type': 'ListItem',
|
||||
position: index + 1,
|
||||
name: item.name,
|
||||
item: item.url,
|
||||
})),
|
||||
}}
|
||||
/>
|
||||
<nav aria-label="Breadcrumb" className="breadcrumbs">
|
||||
<ol>
|
||||
{items.map((item, index) => (
|
||||
<li key={item.url}>
|
||||
{index < items.length - 1 ? (
|
||||
<Link href={item.url}>{item.name}</Link>
|
||||
) : (
|
||||
<span aria-current="page">{item.name}</span>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</nav>
|
||||
</>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
#### Related Icons Section
|
||||
|
||||
Add a related icons section to improve internal linking and user engagement:
|
||||
|
||||
```tsx
|
||||
// components/RelatedIcons.tsx
|
||||
import Link from 'next/link'
|
||||
import Image from 'next/image'
|
||||
import { BASE_URL } from '@/constants'
|
||||
|
||||
export function RelatedIcons({
|
||||
currentIcon,
|
||||
similarIcons
|
||||
}: {
|
||||
currentIcon: string,
|
||||
similarIcons: string[]
|
||||
}) {
|
||||
return (
|
||||
<section aria-labelledby="related-icons-heading">
|
||||
<h2 id="related-icons-heading">Related Icons</h2>
|
||||
<div className="icon-grid">
|
||||
{similarIcons.map(icon => (
|
||||
<Link
|
||||
key={icon}
|
||||
href={`/icons/${icon}`}
|
||||
className="icon-card"
|
||||
>
|
||||
<Image
|
||||
src={`${BASE_URL}/png/${icon}.png`}
|
||||
alt={`${icon.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ')} icon`}
|
||||
width={48}
|
||||
height={48}
|
||||
/>
|
||||
<span>{icon.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ')}</span>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Mobile Optimization
|
||||
|
||||
- [x] Responsive design with fluid layouts
|
||||
- [x] Appropriate viewport configuration:
|
||||
```html
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimumScale=1, maximumScale=5, userScalable=true, themeColor=#ffffff, viewportFit=cover" />
|
||||
```
|
||||
- [ ] Touch-friendly navigation and interface elements (minimum 44x44px tap targets)
|
||||
- [ ] Mobile page speed optimization (reduced JavaScript, optimized images)
|
||||
|
||||
### Mobile-Specific Recommendations
|
||||
|
||||
1. **Implement mobile-specific image handling**:
|
||||
```tsx
|
||||
<Image
|
||||
src={`${BASE_URL}/png/${icon}.png`}
|
||||
alt={`${formattedIconName} icon`}
|
||||
width={64}
|
||||
height={64}
|
||||
sizes="(max-width: 480px) 32px, 64px"
|
||||
quality={90}
|
||||
/>
|
||||
```
|
||||
|
||||
2. **Enhanced touch targets for mobile**:
|
||||
```css
|
||||
@media (max-width: 768px) {
|
||||
.nav-link, .button, .interactive-element {
|
||||
min-height: 44px;
|
||||
min-width: 44px;
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. **Simplified navigation for mobile**:
|
||||
Implement a hamburger menu or collapsible navigation for mobile devices
|
||||
|
||||
## Advanced Next.js 15.3 SEO Features
|
||||
|
||||
Next.js 15.3 offers enhanced SEO features that should be implemented:
|
||||
|
||||
### Dynamic OG Images
|
||||
|
||||
Implement dynamic Open Graph images using the ImageResponse API:
|
||||
|
||||
```typescript
|
||||
// app/icons/[icon]/opengraph-image.tsx
|
||||
import { ImageResponse } from 'next/og'
|
||||
import { getAllIcons } from '@/lib/api'
|
||||
import { BASE_URL } from '@/constants'
|
||||
|
||||
export const runtime = 'edge'
|
||||
export const alt = 'Dashboard Icon Preview'
|
||||
export const size = { width: 1200, height: 630 }
|
||||
export const contentType = 'image/png'
|
||||
|
||||
export default async function OgImage({ params }: { params: { icon: string } }) {
|
||||
const { icon } = params
|
||||
const iconsData = await getAllIcons()
|
||||
const iconData = iconsData[icon]
|
||||
|
||||
if (!iconData) {
|
||||
return new ImageResponse(
|
||||
(
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
backgroundColor: '#f8fafc',
|
||||
color: '#334155',
|
||||
fontFamily: 'sans-serif',
|
||||
}}
|
||||
>
|
||||
<h1 style={{ fontSize: 64 }}>Icon Not Found</h1>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
const formattedIconName = icon
|
||||
.split('-')
|
||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ')
|
||||
|
||||
return new ImageResponse(
|
||||
(
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
backgroundColor: '#f8fafc',
|
||||
color: '#334155',
|
||||
fontFamily: 'sans-serif',
|
||||
padding: 40,
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={`${BASE_URL}/png/${icon}.png`}
|
||||
width={200}
|
||||
height={200}
|
||||
alt={`${formattedIconName} icon`}
|
||||
style={{ marginBottom: 40 }}
|
||||
/>
|
||||
<h1 style={{ fontSize: 64, marginBottom: 20, textAlign: 'center' }}>
|
||||
{formattedIconName} Icon
|
||||
</h1>
|
||||
<p style={{ fontSize: 32, textAlign: 'center' }}>
|
||||
Free download in SVG, PNG, and WEBP formats
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
### Next.js Route Segments for SEO
|
||||
|
||||
Utilize route segment config options to optimize SEO aspects:
|
||||
|
||||
```typescript
|
||||
// app/icons/[icon]/page.tsx
|
||||
export const dynamic = 'force-static' // Ensure static generation even with dynamic data fetching
|
||||
export const revalidate = 3600 // Revalidate content every hour
|
||||
export const fetchCache = 'force-cache' // Enforce caching of fetched data
|
||||
export const generateStaticParams = async () => {
|
||||
// Generate static paths for all icons
|
||||
const iconsData = await getAllIcons()
|
||||
return Object.keys(iconsData).map((icon) => ({ icon }))
|
||||
}
|
||||
```
|
||||
|
||||
### Advanced Caching Strategies
|
||||
|
||||
Implement advanced caching with revalidation tags for dynamic content:
|
||||
|
||||
```typescript
|
||||
// lib/api.ts
|
||||
import { cache, revalidateTag } from 'next/cache'
|
||||
|
||||
// Cache API calls using tags
|
||||
export const getTotalIcons = cache(
|
||||
async () => {
|
||||
const response = await fetch(METADATA_URL, {
|
||||
next: { tags: ['icons-metadata'] },
|
||||
})
|
||||
const data = await response.json()
|
||||
return { totalIcons: Object.keys(data).length }
|
||||
}
|
||||
)
|
||||
|
||||
// Function to trigger revalidation when new icons are added
|
||||
export async function revalidateIconsCache() {
|
||||
revalidateTag('icons-metadata')
|
||||
}
|
||||
```
|
||||
|
||||
## Recommendations
|
||||
|
||||
### Immediate (High Impact/Low Effort)
|
||||
|
||||
1. **Create robots.txt**
|
||||
- Implement a file-based robots.txt using Next.js 15.3 API
|
||||
- Include sitemap reference
|
||||
```typescript
|
||||
// app/robots.ts
|
||||
import { MetadataRoute } from 'next'
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: '*',
|
||||
allow: '/',
|
||||
},
|
||||
sitemap: 'https://dashboardicons.com/sitemap.xml',
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. **Generate XML Sitemap**
|
||||
- Create a dynamic sitemap.xml file using Next.js 15.3 file-based API
|
||||
- Include changefreq and priority attributes
|
||||
- Implement sitemap index for large icon collections
|
||||
```typescript
|
||||
// app/sitemap.ts
|
||||
import { MetadataRoute } from 'next'
|
||||
import { getAllIcons } from '@/lib/api'
|
||||
import { WEB_URL } from '@/constants'
|
||||
|
||||
export default async function sitemap(): MetadataRoute.Sitemap {
|
||||
const iconsData = await getAllIcons()
|
||||
// Implementation as shown in Technical SEO section
|
||||
}
|
||||
```
|
||||
|
||||
3. **Add Structured Data**
|
||||
- Implement JSON-LD for icon pages (ImageObject schema)
|
||||
- Add WebSite schema to the homepage
|
||||
- Include BreadcrumbList schema for navigation
|
||||
```typescript
|
||||
// app/layout.tsx
|
||||
import { JsonLd } from 'next-seo'
|
||||
|
||||
// In component return
|
||||
<JsonLd
|
||||
type="WebSite"
|
||||
data={{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebSite',
|
||||
name: 'Dashboard Icons',
|
||||
url: WEB_URL,
|
||||
description: getDescription(totalIcons),
|
||||
potentialAction: {
|
||||
'@type': 'SearchAction',
|
||||
target: `${WEB_URL}/icons?q={search_term_string}`,
|
||||
'query-input': 'required name=search_term_string'
|
||||
}
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
4. **Enhance Internal Linking**
|
||||
- Implement breadcrumb navigation
|
||||
- Add "related icons" or "similar icons" sections
|
||||
- Create more internal links between icon categories or tags
|
||||
|
||||
### Medium-term Improvements
|
||||
|
||||
1. **Performance Optimization**
|
||||
- Implement priority attribute for critical images
|
||||
- Optimize component-level code splitting
|
||||
- Refine Largest Contentful Paint (LCP) elements
|
||||
|
||||
2. **Enhanced Metadata**
|
||||
- Implement dynamic OG images with the ImageResponse API
|
||||
- Add more specific structured data for each icon category
|
||||
- Implement comprehensive hreflang tags if multilingual support is added
|
||||
|
||||
3. **Content Enhancement**
|
||||
- Add more descriptive text for each icon
|
||||
- Include usage examples and contexts
|
||||
- Improve alt text for all images with detailed descriptions
|
||||
|
||||
### Long-term Strategy
|
||||
|
||||
1. **Advanced Metrics Tracking**
|
||||
- Implement Real User Monitoring (RUM)
|
||||
- Set up Core Web Vitals tracking in the field
|
||||
- Establish regular SEO audit cycles
|
||||
|
||||
2. **Enhanced User Experience**
|
||||
- Implement advanced search functionality with filtering options
|
||||
- Add user collections/favorites feature
|
||||
- Develop a comprehensive filtering system by icon type, style, color, etc.
|
||||
|
||||
3. **Content Expansion**
|
||||
- Add tutorials on how to use the icons
|
||||
- Create themed icon collections
|
||||
- Implement a blog for icon design tips and updates
|
||||
|
||||
## Conclusion
|
||||
|
||||
### Overall SEO Health Assessment
|
||||
|
||||
The Dashboard Icons website currently implements many SEO best practices through Next.js 15.3's App Router features. The project demonstrates strong implementation of:
|
||||
|
||||
- Metadata configuration with the built-in Metadata API
|
||||
- Dynamic generation of page-specific metadata
|
||||
- Open Graph and Twitter Card integration
|
||||
- Server-side rendering and static generation
|
||||
- Proper canonical URL management
|
||||
- Clean, semantic HTML structure
|
||||
- Responsive design for mobile devices
|
||||
|
||||
However, several critical components are missing that would significantly improve search engine visibility:
|
||||
|
||||
1. **Missing Technical Components**:
|
||||
- No robots.txt file
|
||||
- No XML sitemap
|
||||
- No structured data (JSON-LD)
|
||||
- Limited use of Next.js 15.3's advanced features
|
||||
|
||||
2. **Performance Optimization Gaps**:
|
||||
- Missing priority attributes on critical images
|
||||
- Limited implementation of advanced caching strategies
|
||||
- Potential Core Web Vitals optimizations
|
||||
|
||||
3. **Enhanced User Experience Opportunities**:
|
||||
- No breadcrumb navigation
|
||||
- Limited internal linking between related icons
|
||||
- Missing advanced search and filtering capabilities
|
||||
|
||||
### SEO Implementation Score
|
||||
|
||||
| Category | Score | Notes |
|
||||
|----------|-------|-------|
|
||||
| Metadata Implementation | 8/10 | Strong implementation, missing structured data |
|
||||
| Technical SEO | 6/10 | Missing robots.txt and sitemap |
|
||||
| Performance | 7/10 | Good image optimization, room for improvement |
|
||||
| Content Structure | 7/10 | Semantic HTML present, needs better internal linking |
|
||||
| Mobile Optimization | 8/10 | Responsive design, opportunity for touch optimizations |
|
||||
| Next.js 15.3 Features | 5/10 | Not utilizing latest features like dynamic OG images |
|
||||
| Overall | 6.8/10 | Good foundation, specific improvements needed |
|
||||
|
||||
### Priority Action Items
|
||||
|
||||
1. **Immediate (High Impact/Low Effort)**:
|
||||
- Create robots.txt file using file-based API
|
||||
- Generate XML sitemap with Next.js 15.3 API
|
||||
- Add JSON-LD structured data to all page types
|
||||
|
||||
2. **Short-term (Medium Impact)**:
|
||||
- Optimize Core Web Vitals (LCP, CLS, INP)
|
||||
- Add priority attribute to above-the-fold images
|
||||
- Implement breadcrumb navigation with schema
|
||||
|
||||
3. **Long-term (Strategic)**:
|
||||
- Implement dynamic OG images with ImageResponse API
|
||||
- Add more descriptive content for each icon
|
||||
- Develop a comprehensive internal linking strategy
|
||||
- Consider content expansion with tutorials and icon usage guides
|
||||
|
||||
By implementing these SEO improvements, Dashboard Icons will significantly enhance its search engine visibility, user experience, and overall organic traffic growth potential. The existing implementation provides a solid foundation, and these targeted enhancements will help maximize the site's search performance in an increasingly competitive landscape.
|
||||
|
||||
## References
|
||||
|
||||
1. [Next.js 15.3 Metadata API Documentation](https://nextjs.org/docs/app/building-your-application/optimizing/metadata)
|
||||
2. [Google's SEO Starter Guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide)
|
||||
3. [Next.js File-Based Metadata](https://nextjs.org/docs/app/api-reference/file-conventions/metadata)
|
||||
4. [Core Web Vitals - Google Web Dev](https://web.dev/articles/vitals)
|
||||
5. [Schema.org Documentation](https://schema.org/docs/documents.html)
|
||||
6. [Next.js Image Component Documentation](https://nextjs.org/docs/app/api-reference/components/image)
|
||||
7. [Next.js ImageResponse API](https://nextjs.org/docs/app/api-reference/functions/image-response)
|
||||
8. [Google Search Central Documentation](https://developers.google.com/search)
|
||||
9. [Next.js 15.3 App Router SEO Checklist](https://dev.to/simplr_sh/nextjs-15-app-router-seo-comprehensive-checklist-3d3f)
|
||||
10. [Mobile Optimization - Google Search Central](https://developers.google.com/search/mobile-sites)
|
||||
11. [Next.js 15.3 Performance Optimization](https://nextjs.org/docs/app/building-your-application/optimizing)
|
@ -44,11 +44,13 @@ export async function generateMetadata({ params, searchParams }: Props, parent:
|
||||
title: `${formattedIconName} Icon | Dashboard Icons`,
|
||||
description: `Download the ${formattedIconName} icon in SVG, PNG, and WEBP formats for FREE. Part of a collection of ${totalIcons} curated icons for services, applications and tools, designed specifically for dashboards and app directories.`,
|
||||
assets: [iconImageUrl],
|
||||
category: "icons",
|
||||
keywords: [
|
||||
`${formattedIconName} icon`,
|
||||
"dashboard icon",
|
||||
"service icon",
|
||||
`${formattedIconName} icon download`,
|
||||
`${formattedIconName} icon svg`,
|
||||
`${formattedIconName} icon png`,
|
||||
`${formattedIconName} icon webp`,
|
||||
`${icon} icon`,
|
||||
"application icon",
|
||||
"tool icon",
|
||||
"web dashboard",
|
||||
@ -58,10 +60,6 @@ export async function generateMetadata({ params, searchParams }: Props, parent:
|
||||
icon: iconImageUrl,
|
||||
},
|
||||
abstract: `Download the ${formattedIconName} icon in SVG, PNG, and WEBP formats for FREE. Part of a collection of ${totalIcons} curated icons for services, applications and tools, designed specifically for dashboards and app directories.`,
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
},
|
||||
openGraph: {
|
||||
title: `${formattedIconName} Icon | Dashboard Icons`,
|
||||
description: `Download the ${formattedIconName} icon in SVG, PNG, and WEBP formats for FREE. Part of a collection of ${totalIcons} curated icons for services, applications and tools, designed specifically for dashboards and app directories.`,
|
||||
|
@ -7,7 +7,7 @@ import type { Metadata, Viewport } from "next"
|
||||
import { Inter } from "next/font/google"
|
||||
import { Toaster } from "sonner"
|
||||
import "./globals.css"
|
||||
import { getDescription, websiteTitle } from "@/constants"
|
||||
import { BASE_URL, getDescription, WEB_URL, websiteTitle } from "@/constants"
|
||||
import { ThemeProvider } from "./theme-provider"
|
||||
|
||||
const inter = Inter({
|
||||
@ -29,44 +29,41 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
const { totalIcons } = await getTotalIcons()
|
||||
|
||||
return {
|
||||
metadataBase: new URL("https://dashboardicons.com"),
|
||||
metadataBase: new URL(WEB_URL),
|
||||
title: websiteTitle,
|
||||
description: getDescription(totalIcons),
|
||||
keywords: ["dashboard icons", "service icons", "application icons", "tool icons", "web dashboard", "app directory"],
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
"max-image-preview": "large",
|
||||
"max-snippet": -1,
|
||||
"max-video-preview": -1,
|
||||
googleBot: "index, follow",
|
||||
},
|
||||
openGraph: {
|
||||
siteName: "Dashboard Icons",
|
||||
type: "website",
|
||||
locale: "en_US",
|
||||
siteName: WEB_URL,
|
||||
title: websiteTitle,
|
||||
url: BASE_URL,
|
||||
description: getDescription(totalIcons),
|
||||
url: "https://dashboardicons.com",
|
||||
images: [
|
||||
{
|
||||
url: "/og-image.png",
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: "Dashboard Icons",
|
||||
alt: "Dashboard Icons - Dashboard icons for self hosted services",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
site: "@homarr_app",
|
||||
creator: "@homarr_app",
|
||||
title: websiteTitle,
|
||||
title: WEB_URL,
|
||||
description: getDescription(totalIcons),
|
||||
images: ["/og-image.png"],
|
||||
},
|
||||
applicationName: "Dashboard Icons",
|
||||
applicationName: WEB_URL,
|
||||
alternates: {
|
||||
canonical: BASE_URL,
|
||||
},
|
||||
|
||||
appleWebApp: {
|
||||
title: "Dashboard Icons",
|
||||
statusBarStyle: "default",
|
||||
@ -79,13 +76,6 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
{ url: "/favicon-32x32.png", sizes: "32x32", type: "image/png" },
|
||||
],
|
||||
apple: [{ url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" }],
|
||||
other: [
|
||||
{
|
||||
rel: "mask-icon",
|
||||
url: "/safari-pinned-tab.svg",
|
||||
color: "#000000",
|
||||
},
|
||||
],
|
||||
},
|
||||
manifest: "/site.webmanifest",
|
||||
}
|
||||
|
@ -1,45 +1,7 @@
|
||||
import { HeroSection } from "@/components/hero"
|
||||
import { RecentlyAddedIcons } from "@/components/recently-added-icons"
|
||||
import { BASE_URL, REPO_NAME, getDescription, websiteTitle } from "@/constants"
|
||||
import { REPO_NAME } from "@/constants"
|
||||
import { getRecentlyAddedIcons, getTotalIcons } from "@/lib/api"
|
||||
import type { Metadata } from "next"
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const { totalIcons } = await getTotalIcons()
|
||||
|
||||
return {
|
||||
title: websiteTitle,
|
||||
description: getDescription(totalIcons),
|
||||
keywords: ["dashboard icons", "service icons", "application icons", "tool icons", "web dashboard", "app directory"],
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
},
|
||||
openGraph: {
|
||||
title: websiteTitle,
|
||||
description: getDescription(totalIcons),
|
||||
type: "website",
|
||||
url: BASE_URL,
|
||||
images: [
|
||||
{
|
||||
url: "/og-image.png",
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: "Dashboard Icons",
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
title: websiteTitle,
|
||||
description: getDescription(totalIcons),
|
||||
card: "summary_large_image",
|
||||
images: ["/og-image.png"],
|
||||
},
|
||||
alternates: {
|
||||
canonical: BASE_URL,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
async function getGitHubStars() {
|
||||
const response = await fetch(`https://api.github.com/repos/${REPO_NAME}`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user