-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from codex-team/v2
CodeX Docs v2.0.0 🤩
- Loading branch information
Showing
101 changed files
with
14,719 additions
and
2,063 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
* | ||
!public | ||
!src | ||
src/test | ||
!package.json | ||
!yarn.lock | ||
!webpack.config.js | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* | ||
!public/**/* | ||
public/uploads | ||
!dist/**/* | ||
!package.json | ||
!README.md | ||
!yarn.lock | ||
!LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Development guide | ||
|
||
This doc describes how to bootstrap and run the project locally. | ||
|
||
## Setup | ||
|
||
### 1. Clone the repo | ||
```shell | ||
git clone https://github.com/codex-team/codex.docs | ||
``` | ||
|
||
### 2. Install dependencies | ||
|
||
```shell | ||
yarn install | ||
``` | ||
|
||
### 3. Create separate config file for local overrides | ||
|
||
```shell | ||
touch docs-config.local.yaml | ||
``` | ||
|
||
### 4. Run the application | ||
|
||
```shell | ||
yarn dev | ||
``` | ||
|
||
## Starting docs with MongoDB | ||
|
||
By default, the application uses a local database powered by [nedb](https://www.npmjs.com/package/nedb). | ||
In order to use MongoDB, follow these steps: | ||
|
||
|
||
### 1. Run MongoDB instance with docker-compose | ||
|
||
```shell | ||
docker-compose -f docker-compose.dev.yml up mongodb | ||
``` | ||
|
||
### 2. Setup MongoDB driver in docs-config.local.yaml | ||
|
||
```yaml | ||
database: | ||
driver: mongodb | ||
mongodb: | ||
uri: mongodb://localhost:27017/docs | ||
``` | ||
### 3. Run the application | ||
```shell | ||
yarn dev | ||
``` | ||
|
||
## Convert local database to MongoDB | ||
|
||
There is small CLI tool to convert local database to MongoDB in [bin/db-converter](./bin/db-converter/README.md). | ||
Check it out for more details. | ||
|
||
Run it with | ||
|
||
```shell | ||
node bin/db-converter --db-path=./db --mongodb-uri=mongodb://localhost:27017/docs | ||
``` | ||
|
||
## Using S3 uploads driver | ||
|
||
Uploads driver is used to store files uploaded by users. | ||
By default, the application uses local filesystem to store files, but S3 driver is also available. | ||
|
||
### 1. Get credentials for S3 bucket | ||
Create a S3 bucket and get access key and secret key (or use existing ones) | ||
|
||
### 2. Setup S3 driver in docs-config.local.yaml | ||
|
||
```yaml | ||
uploads: | ||
driver: "s3" | ||
s3: | ||
bucket: example.codex.so | ||
region: "eu-central-1" | ||
baseUrl: "http://example.codex.so.s3-website.eu-central-1.amazonaws.com" | ||
keyPrefix: "docs-test" | ||
accessKeyId: "<secret>" | ||
secretAccessKey: "<secret> | ||
``` | ||
### 3. Run the application | ||
```shell | ||
yarn dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": [ | ||
"codex" | ||
], | ||
"env": { | ||
"es2022": true | ||
}, | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"requireConfigFile": false, | ||
"sourceType": "module", | ||
"allowImportExportEverywhere": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.yarn/unplugged | ||
.yarn/build-state.yml |
Oops, something went wrong.