afaik.institute/README.md

102 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2023-09-05 15:11:49 +00:00
# AFAIK.Institure
2023-06-06 13:22:28 +00:00
2023-09-05 15:11:49 +00:00
The repository for [afaik.institute](https://afaik.institute) website.
2023-04-05 09:46:17 +00:00
2023-06-06 13:22:28 +00:00
## How to Run Locally
2023-09-05 15:11:49 +00:00
1. Clone this repository
```bash
$ git clone https://github.com/acid-info/afaik.institute.git
```
2023-06-06 13:22:28 +00:00
2. Install the dependencies:
```bash
2023-09-05 15:11:49 +00:00
$ yarn install
2023-06-06 13:22:28 +00:00
```
2023-09-05 15:11:49 +00:00
3. Start the website:
2023-06-06 13:22:28 +00:00
```bash
$ yarn start
```
2023-09-05 15:11:49 +00:00
4. Visit `http://localhost:3000` in your browser
2023-06-06 13:22:28 +00:00
## Configuration
2023-09-05 15:11:49 +00:00
2023-06-06 13:22:28 +00:00
Edit the `docusaurus.config.js` file in the repository's root directory, and update the value of the `businessUnit` field in presets section; below is a list of valid values:
- Logos
- Codex
- Waku
2023-09-05 15:11:49 +00:00
- Nimbus
- Nomos
- VacResearch
- Acid.info
Currently AFAIK.Institute is not supported in the businessUnit so the config uses Logos temporarily.
## Landing Page
The code for a landing page is located in `src/pages/index.mdx`. This file employs the `mdx` format and utilizes React components from the [Logos Docusaurus Plugins](https://github.com/acid-info/logos-docusaurus-plugins/tree/main/packages/logos-docusaurus-theme/src/client/components/mdx) package.
## Adding Subpages
To include subpages, create a `.md` or `mdx` file within the `about` directory. You can use [Frontmatter](https://docusaurus.io/docs/markdown-features#front-matter) to add metadata to your markdown file.
The content in `about/index.md` will be utilized as the index page for the `/about` section.
## Root Pages
Subpages that do not belong to the `About` page (e.g., [Terms of Use](/root-pages/terms.md)) can be situated in the `root-pages` directory.
2023-06-06 13:22:28 +00:00
2023-09-05 15:11:49 +00:00
## Docusaurus Config
You can find instructions for adding additional documentation sections, implementing localization, and managing versioning on the [Docusaurus](https://docusaurus.io/docs) website.
> Please note that theme customization is somewhat restricted; for more detailed instructions on customizing your theme, visit the [Logos Docusaurus Theme](https://github.com/acid-info/logos-docusaurus-plugins/tree/main/packages/logos-docusaurus-theme/) repository.
## Custom CSS
By default, this template utilizes the CSS styles defined in the [logos-docusaurus-plugins](https://github.com/acid-info/logos-docusaurus-plugins/tree/main/packages/logos-docusaurus-theme/src/client/css) package. You have the option to define custom CSS in `src/css/custom.scss`.
## How to Run a Static Build (Production Build)
1. Generate static files for production:
```bash
$ yarn build
2023-06-06 13:22:28 +00:00
```
2023-09-05 15:11:49 +00:00
The static files will be created in the `build` directory.
2. Serve the static build:
```bash
$ yarn serve
```
## CI/CD
2024-06-07 13:31:06 +00:00
- [CI builds](https://ci.infra.status.im/job/website/job/afaik.institute/) `master` and pushes to `deploy-master` branch, which is hosted at <https://afaik.institute//>.
- [CI builds](https://ci.infra.status.im/job/website/job/dev.afaik.institute/) `develop` and pushes to `deploy-develop` branch, which is hosted at <https://dev.afaik.institute//>.
- The hosting is done using [Caddy server with Git plugin for handling GitHub webhooks](https://github.com/status-im/infra-misc/blob/master/ansible/roles/caddy-git).
Information about deployed build can be also found in `/build.json` available on the website.
2023-06-06 13:22:28 +00:00
2023-04-05 09:46:17 +00:00
2023-09-05 15:11:49 +00:00
## Change Process
2023-04-05 09:46:17 +00:00
2023-09-05 15:11:49 +00:00
1. Create a new working branch from `develop`: `git checkout develop; git checkout -b my-changes`.
2. Make your changes, push them to the `origin`, and open a Pull Request against the `develop` branch.
3. After approval, merge the pull request, and verify the changes on the staging server (e.g., https://dev.vac.dev).
4. When ready to promote changes to the live website, rebase the `master` branch on the staging changes: `git checkout master; git pull origin master; git rebase origin/develop; git push`.