This project requires Node.js 16. If you use nvm, the correct version will be automatically selected via the .nvmrc file:
nvm use
npm installBuild:
npm run buildPreview changes:
nvm use 20
npm run previewPublish changes:
nvm use 20
npm run publishThis is a next.js site that was migrated from static html/css/js.
The legacy js lives in /public/js/main.js and is invoked on route changes.
The legacy styling lives in /public/styles/styles.scss. Sass was chosen in order to scope the existing styles to their respective pages without needing major changes to the markup.
This site leverages next export to generate static assets that are hosted via a cloudflare worker.
Unfortunately, Next.js i18n routing does not support next export. So this site is using a custom implementation of i18n routing via the dynamic route path [locale].
The locale detection and redirect is handled by the cloudflare worker in /workers-site/index.js
The i18n resources live in /public/locales.
To add a new locale:
- Add the locale to
/next-i18next.config.js - Add the locale to
/workers-site/index.js - Add the locale resources in
/public/locales - Add the locale to
/components/LocalePicker.tsx