Technologies:
Main Features:
- RenderSlice: development is done per slice basis
- Custom Page: create a page directly and only from prismic
- Dynamic Layouting: create layout in prismic and apply it to custom page
- Static Site Generation: Blazing fast production as static files
Extras: Layout, Alert, Custom Link, Custom Image, SEOTags, useForm, Context setup
Preview the example live on Here
Deploy the example by clicking below
IMPORTANT PRISMIC SETUP:
- Make a prismic repository
- Make two Repeatable Custom Types :
- Pages (
pages
) - Layouts (
layouts
)
- Pages (
- Find the JSON editor inside, paste the data below, and save
- Begin with creating a document with the
layouts
and add a slice children position. (this is important as it is a coordinate of where the<main>
tag will be among navbar and footer) - Finally you can now create document with
pages
and apply the layout made before - You can continue further development by doing it per slice basis:
- Make a slice in prismic (e.g. Hero Landing
hero-landing
) - Make the corresponding component inside components/_slices (e.g. HeroLanding.tsx)
- Register the new HeroLanding.tsx in _slicelist.ts (import-export manager)
- All Good! Code rightaway in HeroLanding.tsx (for example)
- Make a slice in prismic (e.g. Hero Landing
Execute create-next-app
with npm or Yarn
Or simply short:
Just do
npm install
and then
npm run dev
Fork it first and you're ready to go. Opened for any improvements or fixes