An open API service indexing awesome lists of open source software.

https://github.com/physer/ssg-demo

A small demo of using Static Site Generation together with Contentstack
https://github.com/physer/ssg-demo

contentstack next nextjs nuxt nuxt3 nuxtjs ssg

Last synced: 12 months ago
JSON representation

A small demo of using Static Site Generation together with Contentstack

Awesome Lists containing this project

README

          

# SSG Demo

## Introduction

This repository serves as a demo on Static Site Generation together with the CMS of Contentstack.
Multiple frameworks are used so ease of development and readability can be compared between them.
A shared library is used for communication with Contentstack.

## NextJS

NextJS version 13 is used as a showcase of SSG with NextJS. This does not use the new app router, instead it uses the stable `pages` directory.

## Nuxt

Nuxt version 3 is used as a showcase of SSG with NuxtJS.

## How to run

The repository uses workspaces. Go to the root of the repository and run `npm install` to install the dependencies.

### Prepare CMS library

Before you can run the application, ensure you have the right environment variables available in your `.env` file. You can use `.env.example` as an example. Fill in the necessary values before you continue.

### The applications

In order to run the application using NextJS run the following commands:

1. `npm run next:build`
2. `npm run next:start`

In order to run the application using Nuxt run the following commands:

1. `npm run nuxt:build`
2. `npm run nuxt:start`

In both cases, the application is available on http://localhost:3000.