Skip to content

Commit 52d8a93

Browse files
committed
feat: add Docusaurus documentation site
Create a full documentation site using Docusaurus with: - 26 documentation pages migrated from existing markdown - Getting Started, Configuration, LMS Integration guides - SCORM 1.2 and 2004 standards documentation - Mobile platform integration guides (React Native, Flutter, iOS, Android, etc.) - API reference documentation - Developer contribution guidelines - Interactive demo preserved at /demo - Local search with @easyops-cn/docusaurus-search-local - Light/dark mode support - GitHub and npm icons in navbar/footer - Updated GitHub Pages workflow to build and deploy the docs site
1 parent dc7685b commit 52d8a93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+38645
-6
lines changed

.github/workflows/pages.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
- name: Install dependencies
3636
run: npm ci
3737

38-
- name: Build
38+
- name: Build scorm-again library
3939
run: npm run build:all:prod
4040

4141
- name: Download test modules
4242
run: |
43-
mkdir -p demo/modules
44-
curl -L -o demo/modules/AllGolfExamples.zip https://cdn.noverant.com/AllGolfExamples.zip
45-
cd demo/modules
43+
mkdir -p docs-site/static/demo/modules
44+
curl -L -o docs-site/static/demo/modules/AllGolfExamples.zip https://cdn.noverant.com/AllGolfExamples.zip
45+
cd docs-site/static/demo/modules
4646
unzip -q AllGolfExamples.zip
4747
# Extract nested zip files
4848
for zipfile in *.zip; do
@@ -54,15 +54,21 @@ jobs:
5454
done
5555
5656
- name: Copy dist to demo
57-
run: cp -r dist demo/
57+
run: cp -r dist docs-site/static/demo/
58+
59+
- name: Build documentation site
60+
run: |
61+
cd docs-site
62+
npm ci
63+
npm run build
5864
5965
- name: Setup Pages
6066
uses: actions/configure-pages@v4
6167

6268
- name: Upload artifact
6369
uses: actions/upload-pages-artifact@v3
6470
with:
65-
path: demo
71+
path: docs-site/build
6672

6773
deploy:
6874
environment:

docs-site/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs-site/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```bash
8+
yarn
9+
```
10+
11+
## Local Development
12+
13+
```bash
14+
yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```bash
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
Using SSH:
30+
31+
```bash
32+
USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```bash
38+
GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

0 commit comments

Comments
 (0)