Giter VIP home page Giter VIP logo

jss-static-site-generator's Introduction

Static Site Generator for Sitecore JSS

A static site generator for Sitecore JSS applications. Read more and find information on getting started here.

Prerequisites

  • A working Sitecore JSS React project (v11.02 or higher). Ensure that jss setup has been completed so the required files exist in the project.
  • The follow patches will need to be applied until the next update; #9

Getting Started

  • npm install jss-static-site-generator --save-dev
  • Copy bootstrap-static.js and build-static.js from here.
  • Edit sitecoreApiHost in bootstrap-static.js, change to the domain where your generated site will be hosted.
  • Add the following commands to your JSS project package.json
"bootstrap:static:disconnected": "node scripts/bootstrap-static.js --disconnected",
"bootstrap:static:connected": "node scripts/bootstrap-static.js",
"build:static": "npm-run-all --serial bootstrap:static:disconnected build:client build:server --parallel generate:static",
"build:static:connected": "npm-run-all --serial bootstrap:static:connected build:client build:server --parallel generate:static",
"run:static": "npm-run-all --parallel generate:static",
"generate:static": "node ./scripts/build-static.js"
  • Run build:static or build:static:connected depending on where you want data sourced from.

Assets are compiled into the /static directory.

Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.