Static Page
Learn how to create SEO-optimized static pages using Indie Kit's built-in components
Creating Static Pages with SEO π
Indie Kit comes with many components to help you build SEO-optimized pages (like a landing page) in no time. In this tutorial, we'll create a simple landing page with proper SEO optimization. Let's make something amazing! β¨
Creating a Static Page π¨
Create a new file in your pages directory, for example src/app/events/join-us/page.tsx
:
import { Metadata } from 'next'
import { WebPageJsonLd } from 'next-seo'
import { appConfig } from '@/lib/config'
// Define metadata for the page
export const metadata: Metadata = {
title: 'π Join Us This Weekend - Special Community Event',
description: 'π Join our amazing community this weekend for an unforgettable experience of learning, sharing, and networking!',
openGraph: {
title: 'π Join Us This Weekend - Special Community Event',
description: 'π Join our amazing community this weekend for an unforgettable experience of learning, sharing, and networking!',
url: `${process.env.NEXT_PUBLIC_APP_URL}/events/join-us`,
siteName: appConfig.projectName,
type: 'website',
},
}
export default function JoinUsPage() {
return (
<>
{/* Add JSON-LD structured data */}
<WebPageJsonLd
useAppDir
id={`${process.env.NEXT_PUBLIC_APP_URL}/events/join-us`}
title="π Join Us This Weekend - Special Community Event"
description="π Join our amazing community this weekend for an unforgettable experience of learning, sharing, and networking!"
isAccessibleForFree={true}
publisher={{
"@type": "Organization",
name: appConfig.projectName,
url: process.env.NEXT_PUBLIC_APP_URL,
contactPoint: {
"@type": "ContactPoint",
email: appConfig.legal.email,
contactType: "customer service",
},
}}
/>
{/* Your page content */}
<div className="min-h-screen bg-gradient-to-b from-indigo-50 to-white">
<main className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
<div className="text-center">
<span className="block text-2xl text-indigo-600 mb-2">π</span>
<h1 className="text-4xl font-bold tracking-tight text-indigo-900 sm:text-5xl md:text-6xl">
Join Us This Weekend!
</h1>
<p className="mt-3 max-w-md mx-auto text-base text-indigo-600 sm:text-lg md:mt-5 md:text-xl md:max-w-3xl">
β¨ Be part of something extraordinary! Connect with amazing people, share brilliant ideas, and create unforgettable memories! π
</p>
<div className="mt-8 space-y-4 sm:space-y-0 sm:flex sm:justify-center sm:space-x-4">
<div className="rounded-md shadow">
<a
href="#register"
className="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 md:py-4 md:text-lg md:px-10"
>
Register Now ποΈ
</a>
</div>
<div className="rounded-md shadow">
<a
href="#learn-more"
className="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-indigo-600 bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10"
>
Learn More π
</a>
</div>
</div>
</div>
</main>
</div>
</>
)
}
SEO Features β‘οΈ
Indie Kit provides comprehensive SEO features out of the box. For more details about all available SEO features, check out our SEO Best Practices.
Key SEO features include:
- π Metadata configuration
- π JSON-LD structured data
- π OpenGraph tags
- πΊοΈ Automatic sitemap generation
- π€ Robots.txt configuration
- π± Meta tags for social sharing
Best Practices π«
- β¨ Always include descriptive metadata for each page
- ποΈ Use semantic HTML elements
- πΌοΈ Optimize images with proper alt tags
- π Include structured data when relevant
- π± Ensure mobile responsiveness
- β‘οΈ Optimize loading performance
The example above demonstrates a simple landing page with proper SEO implementation. You can customize the design using Tailwind CSS classes and add more components as needed. Now go ahead and create something amazing! π