Browse Source
Added npm scripts to make building the documentation easier (see `docs-src/README.md`) Updated docusaurus to 1.8 and tested. Note: for the `npm run build` command, on MacOS `cp` cannot be run with the `-avr` flags as previously included in `build-docs.sh`.master

8 changed files with 9714 additions and 3544 deletions
@ -0,0 +1,3 @@ |
|||
## docs |
|||
build/ |
|||
i18n/ |
@ -1,27 +1,39 @@ |
|||
# Auspice Documentation |
|||
|
|||
This folder contains the static site generator and the markdown files which form the auspice documentation website. |
|||
This is currently designed to be served from github pages. |
|||
This is currently designed to be served from GitHub pages using the `auspice/docs` folder. |
|||
[Docusaurus](https://docusaurus.io/) is used to generate the static site. |
|||
|
|||
### Folder structure: |
|||
### Folder structure of `auspice/docs-src/` |
|||
* `README.md` this file |
|||
* `docs/` contains the raw markdown files. The filenames (and directory names) will be used as URLS. |
|||
* `docs/` contains the raw markdown files. The filenames (and directory names) will be used as URLs. |
|||
New pages here should also be added to `sidebars.json`. |
|||
* `website/` the files needed to build the website. |
|||
* `website/sidebars.json` define the doc links in the sidebar |
|||
* `website/pages/index.js` the splash page |
|||
* `./sidebars.json` define the doc links in the sidebar |
|||
* `./pages/index.js` the splash page |
|||
* `./siteConfig.js` docusarus configuration - [see docs here](https://docusaurus.io/docs/en/site-config) |
|||
|
|||
### How to develop: |
|||
|
|||
## How to run |
|||
|
|||
All commands run from this directory (`docs-src`). |
|||
|
|||
#### Installing dependencies |
|||
```bash |
|||
cd website |
|||
npx docusaurus-start |
|||
npm install |
|||
``` |
|||
|
|||
### How to deploy: |
|||
#### Developing (live reloading etc): |
|||
```bash |
|||
npm run develop |
|||
``` |
|||
|
|||
#### (re-)build the static site |
|||
|
|||
```bash |
|||
cd website |
|||
npx docusaurus-build # creates website/build/* |
|||
cd .. |
|||
cp -r website/build/auspice/* ../docs |
|||
npm run build |
|||
``` |
|||
> This command will modify the files in `../docs/` which is where the GitHub pages site is served from. |
|||
|
|||
#### Deploy |
|||
Once changes are merged into the master branch and pushed to GitHub the changes will be live. |
|||
|
File diff suppressed because it is too large
@ -0,0 +1,18 @@ |
|||
{ |
|||
"name": "auspice-documentation", |
|||
"version": "1.0.0", |
|||
"description": "source files for auspice documentation", |
|||
"author": "James Hadfield", |
|||
"license": "AGPL-3.0-only", |
|||
"scripts": { |
|||
"develop": "cd website && docusaurus-start", |
|||
"build": "cd website && docusaurus-build && npm run removeBuiltDocs && cp -r ./build/auspice/* ../../docs && npm run makeReadme", |
|||
"build-docs": "npm run build", |
|||
"removeBuiltDocs": "rimraf ../docs/*", |
|||
"makeReadme": "echo '# Auspice built documentation to be served by GitHub pages.\\n\\nFiles in this folder should not be modified by hand, they are the generated from within the `docs-src` directory.' > ../docs/README.md" |
|||
}, |
|||
"devDependencies": { |
|||
"docusaurus": "^1.8.1", |
|||
"rimraf": "^2.6.3" |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,11 +0,0 @@ |
|||
#!/bin/bash |
|||
set -euo pipefail |
|||
|
|||
base="$(dirname $0)/.." |
|||
cd "$base" |
|||
|
|||
pushd docs-src/website |
|||
docusaurus-build |
|||
popd |
|||
|
|||
cp -avr docs-src/website/build/auspice/* docs/ |
Loading…
Reference in new issue