SleekCMS Next.js Blog Template
A simple, production-ready blog built with Next.js and SleekCMS.
It uses static generation with automatic revalidation and is optimized for deployment on Vercel.
This template is ideal if you want to manage blog content in SleekCMS while keeping full control over your frontend.
π New to SleekCMS?
Create a free account at https://app.sleekcms.com to get your site token and start managing content.
What You Get
-
Static generation with ISR
Pages are statically generated and automatically revalidated every 60 seconds. -
Dynamic blog routes
Blog posts are rendered from/blog/[slug]. -
Minimal, responsive UI
Clean defaults that are easy to customize.
Getting Started
1. Install dependencies
2. Create a SleekCMS site
- Sign up at https://app.sleekcms.com
- Create a new Content Site
- Publish your content and copy the Site Token from the Publish page
3. Configure SleekCMS in the project
Open:
Replace the site token with your own:
siteToken: 'YOUR_SITE_TOKEN'βΉοΈ This project uses read-only tokens for fetching content.
Since the content structure depends on the token, itβs recommended to hard-code it instead of using environment variables.
Content Structure in SleekCMS
Blog pages
Create a Page Collection with:
- Path:
/blog
| Field | Type | Description |
|---|---|---|
| title | Text | Blog post title |
| image | Image | Featured image |
| content | HTML | Blog post body content |
Each page under /blog becomes a blog post.
Home page
Create a Page with:
- Path:
/
| Field | Type | Description |
|---|---|---|
| title | Text | Blog title |
| sub_title | Text | Blog subtitle |
Run Locally
Open your browser at
http://localhost:3000
Deploy to Vercel
- Push this repository to GitHub
- Import the project into Vercel
- Deploy
Content updates in SleekCMS will automatically appear on your site within 60 secondsβno redeploy needed.
Project Structure
βββ app/
β βββ layout.tsx # Root layout and metadata
β βββ page.tsx # Home page (blog list)
β βββ globals.css # Global styles
β βββ blog/
β βββ [slug]/
β βββ page.tsx # Individual blog post
βββ lib/
β βββ sleekcms.ts # SleekCMS client setup
βββ next.config.js
βββ package.json
Customization
Change the revalidation interval
By default, pages revalidate every 60 seconds.
Edit:
app/page.tsxapp/blog/[slug]/page.tsx
Example: revalidate every hour
export const revalidate = 3600
Learn More
- SleekCMS Dashboard: https://sleekcms.com
- Next.js App Router: https://nextjs.org/docs/app