rsnext/examples/with-static-export
Willian Justen 18dc1f66c6 Remove isomorphic-unfetch from examples (#12948)
Since 9.4 release, fetch is pollyfilled by default from #12353,
so the import is not needed anymore.
2020-05-15 22:23:55 +02:00
..
components Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
pages Remove isomorphic-unfetch from examples (#12948) 2020-05-15 22:23:55 +02:00
package.json Remove isomorphic-unfetch from examples (#12948) 2020-05-15 22:23:55 +02: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