Home
Softono
sitecore-jss-nextjs-starterkit

sitecore-jss-nextjs-starterkit

Open source JavaScript
29
Stars
12
Forks
2
Issues
13
Watchers
6 months
Last Commit

About sitecore-jss-nextjs-starterkit

Jamstack for Sitecore JSS using Next.js with Uniform SDK

Platforms

Web Self-hosted

Languages

JavaScript

# Uniform - Sitecore JSS - Next.js starter kit

This repo contains both the starter kit with content items and required configuration files.

You can also use this kit to start a vanilla project, simply remove everything from /src/components and adjust the Sitecore site name from uniform-jss-kit to whatever you want and get cracking.

Docs

  1. Tutorial for Deploy part of this starter kit

  2. Uniform for Sitecore docs

Pre-requisites

  1. Sitecore 9.x-10.x instance available with Sitecore JSS installed and configured
  2. "Uniform for Sitecore" installed and configured on your Sitecore instance. Check out the docs.
  3. Install the Sitecore package with items from /sitecore/App_Data/packages folder.

Getting started with the app

Check out official docs for more scenarios and tutorial.

TL;DR version

  1. Add NPM_TOKEN environment variable with the value we provided you with.
  2. Add JSS_EDITING_SECRET environment variable with the value from "JavaScriptServices.ViewEngine.Http.JssEditingSecret" setting.
  3. npm install
  4. jss setup and follow the steps Sitecore JSS requires and use the API key you created during the Pre-requisites step above.
  5. jss deploy config to deploy the application config from /sitecore/config folder into your Sitecore instance.
  6. Configure .env file according to your environment specifics (see .env-example file).
  7. npm run build to build the app.
  8. npm run dev to start development server.
  9. npm start to start the app in connected mode.
  10. npm run export to run static export.

Note: Remove or update the robots.txt if you going to use this kit in production

See Sitecore documentation on Walkthrough: Connecting a Next.js JSS app to Sitecore editors