rsnext/examples/with-static-export
2020-04-07 12:03:03 +02:00
..
components Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
pages Update examples to use getStaticProps where possible (#11136) 2020-03-17 15:07:27 +01:00
package.json Update examples: static export using dynamic routes instead exp… (#9237) 2019-10-29 17:17:48 +01:00
README.md Remove outdated sentence from static-export example (#11708) 2020-04-07 12:03:03 +02:00

Static export example

This example show how to export to static HTML files your Next.js application fetching data from an API to generate a dynamic list of pages.

When trying to run npm start it will build and export your pages into the out folder and serve them on localhost:5000.

How to use

Using create-next-app

Execute create-next-app with npm or Yarn to bootstrap the example:

npm init next-app --example with-static-export with-static-export-app
# or
yarn create next-app --example with-static-export with-static-export-app

Download manually

Download the example:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-static-export
cd with-static-export

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev