-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructuring documentation to enable website generation (#509)
* Add initial version of docs for website * Enabled plugin for (local) search functionality * Cleaned up settings & added Tabs & Syntax Highlighting for Code Blocks * Minor textual improvements & using Tabs for Reasoning page * Create Github Action for deployment of documentation website
- Loading branch information
Showing
38 changed files
with
16,215 additions
and
153 deletions.
There are no files selected for viewing
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,32 @@ | ||
name: Deploy documentation website | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- docs/** | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@master | ||
- name: Install dependencies | ||
working-directory: ./docs | ||
run: npm install | ||
- name: Build documentation website | ||
working-directory: ./docs | ||
run: npm run build | ||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
known_hosts: 'placeholder' | ||
- name: Add known hosts | ||
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | ||
- name: Deploy to server | ||
working-directory: ./docs | ||
run: scp -r build/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_DOCS_PATH }} |
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,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Documentation | ||
|
||
This directory contains the documentation for the Knowledge Engine as well as the required settings that are used to generate the documentation website. | ||
The documentation can be found in the `docs/` directory. | ||
|
||
|
||
## Generating the website | ||
|
||
Required: | ||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above: | ||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies. | ||
|
||
### Generate website files | ||
To statically generate the website, within this directory (`knowledge-engine/docs/`), run: | ||
```bash | ||
npm run build | ||
``` | ||
This will generate a `build/` directory containing all files for the website. | ||
|
||
Be careful when editing code blocks with tabs. | ||
Currently, it requires you to leave empty lines around the Markdown syntax | ||
|
||
|
||
|
||
### Test the site locally | ||
|
||
If you're working on the documentation, you can locally run a serve so you can easily see what your changes look like. | ||
To run the development server, within this directory (`knowledge-engine/docs/`), execute: | ||
```bash | ||
npm run start | ||
``` | ||
|
||
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. | ||
The site will **automatically reload** and display your changes. |
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,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
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
Oops, something went wrong.