/prismicsm-nextjs

My first Prismic Next.js website using Slice Machine

Primary LanguageJavaScript

Basic Prismic Next.js Starter using Slice Machine

Purpose

Develop a basic homepage with mock content to learn how to use Prismic's Slice Machine with Next.js.

The page has four sections: Header, Hero, Plan Grid, and Footer. A layout is used for the head of the website and wraps the Header and Footer components around the page content as well as passing the currency context provider.

The Header component contains the Navigation slice so links can be added and edited using Prismic.

The Hero slice uses CSS Grid so the background image can be updated using Prismic.

The currency select uses a context provider to pass the value from the Header component to the Plan Grid slice to update the currency of the plan prices.

Screenshot

Next.js Slice Machine Website Screenshot

View Website

To view the website, clone this git repository using git clone https://github.com/louisefindlay23/prismicsm-nextjs.git and then in the terminal, run npm start. On first run, you may need to build the website first using npm run build. Open http://localhost:3000 in your browser to view the website.

If you wish to run Slice Machine to view, edit and create the slices, run npm run slicemachine in a new terminal as well and open http://localhost:9999 in your browser to view Slice Machine.

Resources Used

Tutorials

CSS

Design