strapi mit next.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
marius b27e05a97d init 2 years ago
..
components init 2 years ago
pages init 2 years ago
public init 2 years ago
styles init 2 years ago
utils init 2 years ago
.env.local.example init 2 years ago
.eslintrc init 2 years ago
.gitignore init 2 years ago
README.md init 2 years ago
jsconfig.json init 2 years ago
next.config.js init 2 years ago
package-lock.json init 2 years ago
package.json init 2 years ago
postcss.config.js init 2 years ago
tailwind.config.js init 2 years ago
yarn.lock init 2 years ago

README.md

Next frontend

This frontend relies on Next's Static Generation using Strapi as the data source. Make sure Strapi is running in parallel when you run this app.

Routes

pages/...slug.js

This file generates all the app's route. First, it fetches all the pages entries in Strapi. Then, it creates one route per page found. These routes can look like this:

  • yoursite.com
  • yoursite.com/page
  • yoursite.com/page/nested/route

Notice that the path of the page can be several layers deep, or it can be the root of the site. This is possible thanks to Next's optional catch-all routes.

To see how to build these nested routes, see the Strapi project's Readme.

Available Scripts

In the project directory, you can run:

yarn dev

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any errors in the console.

yarn build

Builds the app for production to the .next folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

yarn start

Starts the application in production mode. The application should be compiled with `next build` first.

See the section in Next docs about deployment for more information.