The website is created using create-react-app and was made to run as a statical website requiring little to no maintenance through the years.
- Debian based distro: follow this link
- Arch based distro:
pacman -S nodejs npm
> git clone "https://github.com/Cerkinfo/website"
> cd website
> npm install # or yarn install if you prefer
> npm run start
To create the index for the statical assets (pdf, markdown files and make them visible for the website you should also run these commands once.
> npm run build:folklore
> npm run build:admin
> npm run build:content
Run this command in the root folder.
node utils/listpdf.mjs src/assets/pv/ > ./src/assets/pv/pv.json
To deploy the website you need the 'write' rights on this repository.
> npm run deploy
Maybe you forgot to compile the markdown text to html format ?
Run $npm run build
or $npm run build:[folders]
.
The different available folders are:
- admin
- content
- folklore
When deploying to github page the following issue can happen with react-snap
and the Chrome Headless Browser: Puppeteer
.
> react-snap
Error: Failed to launch chrome!
[0322/190402.289509:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
You might check the troubleshooting guide of Puppeteer
.
What worked for me is the following commands.
# cd to the downloaded instance
cd <project-dir-path>/node_modules/puppeteer/.local-chromium/linux-<revision>/chrome-linux/
sudo chown root:root chrome_sandbox
sudo chmod 4755 chrome_sandbox
# copy sandbox executable to a shared location
sudo cp -p chrome_sandbox /usr/local/sbin/chrome-devel-sandbox
# export CHROME_DEVEL_SANDBOX env variable
export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox
Contact: webmaster@cercle-informatique.be