Skip to content

0x6Star3s/headless-nextjs-template

Repository files navigation

Headless-nextjs-template

screencapture-headless-nextjs-template-vercel-app-admin-presentation-2024-08-29-14_29_57 1

Visit demo

Key Features

  • Pre-configured Sanity schema for rapid content structuring.
  • Pre-built frontend components for rapid website development.
  • Visual editing right inside the Embedded Sanity Studio.
  • Auto-generated Table of Contents component based on headings.
  • Auto-generated sitemap.xml and blog rss.xml.

Tech Stack

Next.js 14 (App Router, RSC, Typescript), Tailwind CSS and scss

Add modules

1.mp4

Changing the position of a section

2.mp4

Demo of Creative module

3.mp4

Review changes

4.mp4

Different versions of the button (cta)

5.mp4

How quickly you can change the content on the page

6.mp4

How to add any photo from unsplash

7.mp4

Getting Started

Clone or fork the template from the GitHub template.

2. Get a new Sanity project ID

From the Sanity.io Manage dashboard, create a new project from scratch (blank schema) with CLI.

3. Update environment variables

# .env.local
NEXT_PUBLIC_BASE_URL = ... # http://localhost:3000
NEXT_PUBLIC_SANITY_PROJECT_ID = ... # abcdefgh
NEXT_PUBLIC_SANITY_TOKEN = ... # retrieve from https://sanity.io/manage

NEXT_PUBLIC_SANITY_DATASET= ... # production
NEXT_PUBLIC_SANITY_API_VERSION= ... # 2024-07-01

4. Populate the Studio with your content

Open your new Sanity Studio (‌https://localhost:3000/admin) and publish the following documents:

  1. a Page document with slug: index to use as the Home page.

For websites with a blog, additionally publish the following documents:

  1. a Page document with slug: blog to use as the Blog listing page.
  2. a Page document with slug: blog/* to use as the Blog post template page.

Optionally, you can publish the following documents:

  • a Page document with slug: 404 to use as the Page not found page.

Releases

No releases published

Packages

 
 
 

Contributors