Skip to content

AddressForAll/site-v2

Repository files navigation

AddressForAll website version 2

This is a Next.js project bootstrapped with create-next-app. See more details at documentation, /_docs.

How to install

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:

make
  • make dev: run the npm dev, to a temporary deply at localhost.
  • make build: makes build-only and rm_rehydration.
  • make serve: run the npm serve after build, to also deploy localhost.
  • make build-only: run the npm build and save /out folder.
  • make rm_rehydration: remove the rehydration data from /out after the build.

Install wihout make

Install direct:

npm install

Notice the use of --force, this is for resolve the ERESOLVE could not resolve npm Error. Get the documentation here Fixed!"react-dom": "18.0.0"

Then you can either:

Run the development server

npm run dev

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

or

Generate the static version

npm run build

Verify yourself

To prove that this works, run:

npm run serve

and 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;'

LICENSE

For this source-code, see LICENSE file (Apache v2). For libraries and /public assets dependencies:

About

New AddressForAll website, version 3 of attempts to make it better

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7