The Codidact project landing page. It should contain a high-level overview of what the Codidact project is about, as well as references to resources such as:
A staging environment is available at https://codidact.codeberg.page/landing-page/ (see staging workflow for details).
This site is live at https://codidact.org. Deployments are done via the deployment workflow.
The following secrets are expected to be present in the repository:
| Name | Description |
|---|---|
FTP_HOST |
server host name to upload the build to |
FTP_USER |
user to use for authentication |
FTP_PASS |
password to use for authentication |
- Ensure node and npm are installed locally (nvm recommended).
- Set node version to 22.13.1. You can install it using
nvm install 22.13.1, and runningnvm use 22.13.1to use it in the project. - Run
npm installto install project dependencies. - Run
npm run startto start the front-end. This can be viewed by navigating tolocalhost:3000in your browser.
Alternatively, our Docker setup can be used. Having either Docker Desktop or Docker Engine is a prerequisite. If used with Docker Compose (see compose.yml for configuration), docker-compose-plugin also has to be installed. To set up the project with Compose:
- Run
docker compose upfrom project root (see the official reference for details & other commands). - Connect to the container by running
docker exec -it landing-page-dev bash(assuming you want to usebashas your shell). - If it's a clean build or if dependencies have changed, run
npm cifrom the container. - Run
npm run startto start the server listening on the port determined by theHOST_DEV_PORTvariable (defaults to3000).
After you make changes, build:
npm run build
This should make changes in dist. Include those in your commit.
Items for the FAQ section are sourced from our docs repository. If you want to update them, please open an issue or a PR there.
Before submitting a PR, ensure your code is linted by running npm run lint. Any submitted PRs will be rejected if linting does not pass.
- All formatting (except JS) is handled by Prettier (we recommend installing an auto-formatter for your IDE). The configuration is located in
.prettierrc. - JS formatting and linting is handled by ESLint. JSON config resides in
.eslintrc(to be added). - CSS linting handled by stylelint. JSON config in
.stylelintrc.
MIT license applies to source code. It does not apply to assets under
dist/assets/img/, particulary not to those within
dist/assets/img/3rd-party/.
Same applies to src/img/.