initial commit
This commit is contained in:
66
templates/page.template.tsx
Normal file
66
templates/page.template.tsx
Normal file
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Page Template
|
||||
*
|
||||
* Usage: Copy this file to create new pages
|
||||
* 1. Replace TEMPLATE_NAME with your page name
|
||||
* 2. Update the metadata
|
||||
* 3. Implement your page logic
|
||||
*/
|
||||
|
||||
import { Metadata } from 'next'
|
||||
import { generateMetadata } from '@/lib/seo'
|
||||
|
||||
// Page metadata
|
||||
export const metadata: Metadata = generateMetadata({
|
||||
title: 'TEMPLATE_NAME - NextJS Boilerplate',
|
||||
description: 'Description for TEMPLATE_NAME page',
|
||||
// Add other SEO properties as needed
|
||||
})
|
||||
|
||||
// Page component
|
||||
export default function TemplatePage() {
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<div className="max-w-4xl mx-auto">
|
||||
{/* Page Header */}
|
||||
<div className="mb-8">
|
||||
<h1 className="text-4xl font-bold mb-4">TEMPLATE_NAME</h1>
|
||||
<p className="text-lg text-muted-foreground">Page description goes here</p>
|
||||
</div>
|
||||
|
||||
{/* Main Content */}
|
||||
<div className="space-y-8">
|
||||
{/* Add your content sections here */}
|
||||
<section>
|
||||
<h2 className="text-2xl font-semibold mb-4">Section Title</h2>
|
||||
<p className="text-muted-foreground">Section content goes here</p>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* For dynamic pages, you can export generateStaticParams or use dynamic segments
|
||||
*
|
||||
* Example for dynamic routes:
|
||||
*
|
||||
* interface Props {
|
||||
* params: { slug: string };
|
||||
* }
|
||||
*
|
||||
* export default function DynamicPage({ params }: Props) {
|
||||
* const { slug } = params;
|
||||
* // Page logic here
|
||||
* }
|
||||
*
|
||||
* // For static generation
|
||||
* export async function generateStaticParams() {
|
||||
* // Return array of params
|
||||
* return [
|
||||
* { slug: 'example-1' },
|
||||
* { slug: 'example-2' },
|
||||
* ];
|
||||
* }
|
||||
*/
|
||||
Reference in New Issue
Block a user