Giter VIP home page Giter VIP logo

next-wekit's Introduction

This is a Next.js project with the basic content model of the wekit in Contentful. It uses Contentful's Delivery API to fetch the content and Next.js's Static Generation to render the pages. This project is a POC for using Next.js with Contentful. In addition I'd like to test some Next features like Incremental Static Regeneration.

Getting Started

Install dependencies

npm install

Development

npm run dev

Open http://localhost:3000 with your browser to see the result.

In order to see the content you need to create a .env file in the root of the project and add the Contentful space ID and access tokens to it.

Incremental Static Regeneration

To test the Incremental Static Regeneration feature run the development server or visit the deployed version and wait for 10 seconds. Then change the order of the modules on a page or the Internal name of a text module ( /text-module ). You should see the changes after 5 seconds or with a refresh of the page.

Module renderer

In order to render the module based pages like it's used to be in the wekit setup I needed to have a module renderer that is reacting and dynamically stacking together the pages. It takes the contentTypeId of the module and renders the corresponding module located in the modules/ folder.

Building the pages

I've tried to work with GraphQL and also with the contentful-ssg-package but this given setup now seems to work more easy and straight forward.

To Dos

  • [] Develop working modules like text or stage that is using data from Contenful
  • [] Add more features that are already implemented in the wekit
  • [] Add more modules
  • [] Add more pages
  • [] Add tests
  • [] Add more documentation
  • [] Test some Next.js 13 features

next-wekit's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.