Skip to content

Commit e9b04ca

Browse files
committed
New version
1 parent 0c96f0d commit e9b04ca

17 files changed

Lines changed: 41 additions & 140 deletions
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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`
8590
3. 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

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ include:
1919
- tests.html
2020

2121
exclude:
22-
- docs/MAINTAIN-DOC.md
22+
- MAINTAIN-DOC.md
2323
- Gemfile
2424
- Gemfile.lock

_layouts/default.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,19 @@
8080
<body>
8181
<nav>
8282
<a class="nav-title" href="{{ site.baseurl }}/">HDS Lib</a>
83-
<a href="{{ site.baseurl }}/docs/">Overview</a>
83+
<a href="{{ site.baseurl }}/getting-started">Getting Started</a>
8484
<span class="nav-sep">|</span>
85-
<a href="{{ site.baseurl }}/docs/getting-started">Getting Started</a>
85+
<a href="{{ site.baseurl }}/hds-model">Model</a>
8686
<span class="nav-sep">|</span>
87-
<a href="{{ site.baseurl }}/docs/hds-model">Model</a>
87+
<a href="{{ site.baseurl }}/app-templates">App Templates</a>
8888
<span class="nav-sep">|</span>
89-
<a href="{{ site.baseurl }}/docs/app-templates">App Templates</a>
89+
<a href="{{ site.baseurl }}/settings">Settings</a>
9090
<span class="nav-sep">|</span>
91-
<a href="{{ site.baseurl }}/docs/settings">Settings</a>
91+
<a href="{{ site.baseurl }}/localization">Localization</a>
9292
<span class="nav-sep">|</span>
93-
<a href="{{ site.baseurl }}/docs/localization">Localization</a>
93+
<a href="{{ site.baseurl }}/toolkit">Toolkit</a>
9494
<span class="nav-sep">|</span>
95-
<a href="{{ site.baseurl }}/docs/toolkit">Toolkit</a>
96-
<span class="nav-sep">|</span>
97-
<a href="{{ site.baseurl }}/docs/utilities">Utilities</a>
95+
<a href="{{ site.baseurl }}/utilities">Utilities</a>
9896
<span class="nav-sep">|</span>
9997
<a href="{{ site.baseurl }}/tests.html">Tests</a>
10098
</nav>
File renamed without changes.

docs/_config.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.
File renamed without changes.

hds-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hds-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

index.html

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)