@@ -5,20 +5,25 @@ This file describes when and how to update the hds-lib-js documentation in `docs
55## Structure
66
77```
8- docs/
9- ├── _config.yml # Jekyll configuration for gh-pages
10- ├── index.md # Library overview, architecture diagram, export list
11- ├── getting-started.md # Installation, setup, browser/Node usage
12- ├── settings.md # Settings module reference
13- ├── hds-model.md # HDSModel, items, streams, authorizations, event types, datasources
14- ├── app-templates.md # Detailed App Templates guide (Manager, Collector, Invite, Client)
15- ├── localization.md # Localization utilities
16- ├── toolkit.md # StreamsAutoCreate, StreamTools
17- ├── utilities.md # Duration, reminders, errors, logger
18- ├── assets/ # Images, SVG diagrams (if extracted from inline)
19- └── MAINTAIN-DOC.md # This file (excluded from Jekyll build)
8+ docs/ (source, in repo)
9+ ├── _config.yml # Jekyll configuration for gh-pages
10+ ├── _layouts/
11+ │ └── default.html # Custom layout (nav bar, mermaid support)
12+ ├── index.md # Home: overview, architecture, export list
13+ ├── getting-started.md # Installation, setup, browser/Node usage
14+ ├── settings.md # Settings module reference
15+ ├── hds-model.md # HDSModel, items, streams, authorizations, event types, datasources
16+ ├── app-templates.md # Detailed App Templates guide (Manager, Collector, Invite, Client)
17+ ├── localization.md # Localization utilities
18+ ├── toolkit.md # StreamsAutoCreate, StreamTools
19+ ├── utilities.md # Duration, reminders, errors, logger
20+ └── MAINTAIN-DOC.md # This file (excluded from Jekyll build)
2021```
2122
23+ On build (` npm run build ` ), webpack copies docs flat into ` dist/ ` alongside
24+ the JS bundles and test files. ` dist/ ` is the gh-pages branch root — Jekyll
25+ processes it as a single flat site.
26+
2227## When to update
2328
2429### Always update docs when:
@@ -80,28 +85,23 @@ docs/
8085
8186### Adding a new page
8287
83- 1 . Create ` docs/new-page.md ` with Jekyll front matter
84- 2 . Add entry to ` nav: ` in ` docs/_config.yml `
88+ 1 . Create ` docs/new-page.md ` with Jekyll front matter ( ` layout: default ` , ` title: ... ` )
89+ 2 . Add a nav link in ` docs/_layouts/default.html `
85903 . Add link to the table in ` docs/index.md `
8691
8792## Publishing (gh-pages)
8893
89- The docs are designed for GitHub Pages with Jekyll. To publish:
94+ The ` dist/ ` directory is a separate git checkout on the ` gh-pages ` branch.
95+ Docs are copied flat into ` dist/ ` by the webpack build alongside JS bundles.
9096
91- 1 . Enable GitHub Pages on the repo (Settings > Pages > Source: branch ` main ` , folder ` /docs ` )
92- 2 . Jekyll will build automatically using the ` _config.yml ` configuration
93- 3 . The Cayman theme is used via ` remote_theme `
97+ ** Deploy workflow: **
98+ 1 . ` npm run build` — compiles TS, bundles JS, copies docs to ` dist/ `
99+ 2 . ` npm run deploy ` — commits and pushes ` dist/ ` to gh-pages
94100
95- For local preview:
101+ Jekyll processes the gh-pages branch root. Our custom ` _layouts/default.html `
102+ provides the nav bar and mermaid rendering (no remote theme dependency).
96103
97- ``` bash
98- cd docs
99- gem install bundler jekyll
100- bundle init
101- # Add to Gemfile: gem "github-pages", group: :jekyll_plugins
102- bundle install
103- bundle exec jekyll serve
104- ```
104+ ** URL structure:** ` https://healthdatasafe.github.io/hds-lib-js/{page} `
105105
106106## Versioning
107107
@@ -112,7 +112,6 @@ When the library version changes significantly, consider noting breaking changes
112112- [ ] Updated all affected pages
113113- [ ] Code examples are correct and tested
114114- [ ] Mermaid diagrams render (check on GitHub preview)
115- - [ ] SVG diagrams are well-formed
116- - [ ] ` _config.yml ` nav is up to date
115+ - [ ] Nav links in ` _layouts/default.html ` are up to date
117116- [ ] ` index.md ` exports table is up to date
118117- [ ] No broken internal links
0 commit comments