This is a Next.js project bootstrapped with create-next-app.
See more details at documentation, /_docs.
First clone this repo and install the node modules
git clone https://github.com/AddressForAll/site-v2.git
cd site-v2/Install using Linux makefile, that show your options first:
makemake dev: run thenpm dev, to a temporary deply at localhost.make build: makes build-only and rm_rehydration.make serve: run thenpm serveafter build, to also deploy localhost.make build-only: run thenpm buildand save/outfolder.make rm_rehydration: remove the rehydration data from/outafter the build.
Install direct:
npm installNotice the use of Fixed!--force, this is for resolve the ERESOLVE could not resolve npm Error. Get the documentation here"react-dom": "18.0.0"
Then you can either:
npm run devOpen http://localhost:3000 with your browser to see the result.
or
npm run buildTo prove that this works, run:
npm run serveand open your browser at http://localhost:8080
You can now deploy the out/ folder to any static webserver.
To remove the rehydration data regex: <script id="__NEXT_DATA__((.|n)*)script> from all pages of the static website run the following command after the build has finished:
find out -name '*.html' | xargs perl -0777 -pi -e 's/<script id="__NEXT_DATA__.*?script>//sg;'For this source-code, see LICENSE file (Apache v2). For libraries and /public assets dependencies:
- ReactJS LICENSE (MIT).
- NextJS LICENSE (MIT).
- Fonts: oNline Web Fonts are licensed by CC BY v3.