Skip to main content

static-site Template

A Next.js template optimized for static sites, landing pages, documentation, and marketing sites.

Quick Start

Visit http://localhost:3000 to see your site.

Specifications

Project Structure

Key Files

next.config.js

The template is configured for static export:

Health Endpoint

The health check is a static file at public/health:
This ensures health checks work without a Node.js server.

Adding Pages

Create new pages in app/:

Styling

The template uses Tailwind CSS:

Custom Styles

Add custom CSS in app/globals.css:

Components

Creating Components

Using Components

Local Development

Building

Deployment

The Dockerfile serves the static files with a lightweight server:

Use Cases

Landing Page

Fast, SEO-friendly marketing pages

Documentation

Static docs with search capability

Portfolio

Personal or agency portfolios

Blog

Static blog with MDX support

SEO Optimization

Metadata

Per-Page Metadata

Best Practices

Use Next.js Image component or optimized formats (WebP, AVIF).
Use Server Components by default. Add 'use client' only when needed.
Fetch data at build time, not runtime, for faster loads.
Configure nginx/CDN caching for static assets.