Next.js static site starter including full setup for TypeScript, Tailwind CSS, Google Analytics, Next SEO, etc.
NextSSS is a Next.js starter template designed specifically for static sites. It includes a complete setup for TypeScript, Tailwind CSS, Google Analytics, Next SEO, and an active link component. This template is aimed at developers who want to quickly bootstrap their static site projects using Next.js.
To use the NextSSS starter template, follow these steps:
Bootstrap the template by executing the following command using npm or Yarn:
npx create-next-app next-sss-template
Edit the GA_TRACKING_ID variable in the /lib/gtag.ts file with your Google Analytics tracking ID.
Implement the active className on a link by adding the following code snippet to your project:
// Example:
<Link href="/" activeClassName="active">
Home
</Link>
Use the image component by importing it with a static export. Here’s an example:
// Example:
import Image from '../components/Image';
export default function MyPage() {
return (
<div>
<Image src="/path/to/image.png" alt="My Image" />
</div>
);
}
If you plan to deploy the project to Vercel, make sure to remove the custom loader from the next.config.js and components/Image.tsx files.
NextSSS is a Next.js starter template built specifically for static sites, providing a pre-configured setup for TypeScript, Tailwind CSS, Google Analytics, Next SEO, an active link component, and an image component. With the easy installation guide and helpful resources provided, developers can quickly get started with their static site projects using NextSSS. The template is accompanied by a permissive MIT license, inviting contributions from the community.