Skip to content

Commit c546b8d

Browse files
Use JSON-relative asset paths for v0.1.3 loader
Update week-01 and week-02 presentation.json to reference assets via ../../assets/... so agentic-presentation-builder v0.1.3's local-deck loader and present-cli can resolve them from the JSON file's location. Publishing doc now documents the rewrite step: source keeps repo-relative paths; the osc-docs copy flips them to ./assets/ so per-week bundles stay self-contained when served via iframe.
1 parent 0d37045 commit c546b8d

3 files changed

Lines changed: 34 additions & 25 deletions

File tree

.context/publishing.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,20 @@ For every session week, follow this pattern.
3838

3939
### 1. Build the Presentation Bundle
4040

41+
Use agentic-presentation-builder **v0.1.3 or newer**. v0.1.3 added the local-deck loader and `present-cli`, both of which resolve asset paths relative to the JSON file. That is why the source `presentation.json` files use `../../assets/...` (relative to `presentations/week-NN/`, which lands at the repo's `assets/` directory).
42+
4143
From the presentation builder:
4244

4345
```bash
4446
cd ~/Documents/git/osc/agentic-presentation-builder
47+
git fetch --tags
48+
git checkout v0.1.3 # or newer
49+
bun install
4550
bun run build
4651
# Output goes to dist/
4752
```
4853

49-
This produces a static bundle with an updated `presentation.html` and hashed asset files. If the engine has not changed since Week 1, you can reuse the existing bundled `assets/` (Reveal.js JS/CSS) and only swap the JSON + icons.
54+
This produces a static bundle with an updated `presentation.html` and hashed asset files. If the engine has not changed since the previous week, you can reuse the existing bundled `assets/` (Reveal.js JS/CSS) and only swap the JSON + icons.
5055

5156
### 2. Copy the Slides into osc-docs
5257

@@ -67,12 +72,14 @@ cp -r ~/Documents/git/osc/osc-docs/courses/slides/agentic-research/week-01/asset
6772
cp ~/Documents/git/osc/osc-docs/courses/slides/agentic-research/week-01/presentation.html \
6873
~/Documents/git/osc/osc-docs/courses/slides/agentic-research/$WEEK/presentation.html
6974

70-
# Copy the week's JSON
71-
cp ~/Documents/git/osc/agentic-research-course/presentations/$WEEK/presentation.json \
72-
~/Documents/git/osc/osc-docs/courses/slides/agentic-research/$WEEK/$WEEK.json
75+
# Copy the week's JSON, rewriting asset paths from "../../assets/" to "./assets/"
76+
# (per-week bundles are self-contained, so the published JSON points at sibling assets)
77+
sed 's|"src": "\.\./\.\./assets/|"src": "./assets/|g' \
78+
~/Documents/git/osc/agentic-research-course/presentations/$WEEK/presentation.json \
79+
> ~/Documents/git/osc/osc-docs/courses/slides/agentic-research/$WEEK/$WEEK.json
7380

7481
# Copy only the icons this week actually references
75-
# (check presentation.json for "./assets/icons/*.svg" references)
82+
# (check presentation.json for "../../assets/icons/*.svg" references)
7683
cp ~/Documents/git/osc/agentic-research-course/assets/icons/claude-*.svg \
7784
~/Documents/git/osc/osc-docs/courses/slides/agentic-research/$WEEK/assets/icons/
7885
# ...etc. Copy only what the JSON references.
@@ -82,6 +89,8 @@ cp ~/Documents/git/osc/agentic-research-course/assets/screenshots/*.png \
8289
~/Documents/git/osc/osc-docs/courses/slides/agentic-research/$WEEK/assets/screenshots/
8390
```
8491

92+
> **Why the rewrite?** Source JSON uses `../../assets/...` so the local-deck loader and `present-cli` (v0.1.3+) can find files at the repo root. The osc-docs deployment serves slides via plain iframe, so `<img src>` resolves relative to `presentation.html`'s URL. Per-week bundles keep `assets/` as a sibling of the JSON, so paths must be flipped to `./assets/` on copy.
93+
8594
If the engine has changed (new agentic-presentation-builder release), copy the full `dist/assets/` fresh:
8695

8796
```bash
@@ -236,4 +245,4 @@ After the YouTube upload:
236245

237246
- **Slide iframe breaks on mobile Safari** if the Reveal.js bundle is missing even one hashed asset. Always copy the complete `assets/` directory.
238247
- **MkDocs tab sync** requires exact label match across the whole page. One mismatched label breaks every tab group.
239-
- **Relative paths in JSON:** The slide JSON uses `./assets/icons/*.svg`. Those paths are relative to the slide `presentation.html` location, not the markdown page.
248+
- **Relative paths in JSON:** Source JSON uses `../../assets/icons/*.svg` (relative to `presentations/week-NN/`, resolving to the repo's `assets/`). The local-deck loader and `present-cli` honor JSON-relative paths. The osc-docs publish step rewrites them to `./assets/...` so they resolve relative to the bundled `presentation.html`.

presentations/week-01/presentation.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"elements": [
106106
{
107107
"type": "image",
108-
"src": "./assets/icons/ai-landscape.svg",
108+
"src": "../../assets/icons/ai-landscape.svg",
109109
"alt": "AI neural network icon",
110110
"width": "120px",
111111
"height": "120px",
@@ -568,7 +568,7 @@
568568
"elements": [
569569
{
570570
"type": "image",
571-
"src": "./assets/icons/terminal.svg",
571+
"src": "../../assets/icons/terminal.svg",
572572
"alt": "Terminal icon",
573573
"width": "120px",
574574
"height": "120px",
@@ -678,7 +678,7 @@
678678
"elements": [
679679
{
680680
"type": "image",
681-
"src": "./assets/icons/git-branch.svg",
681+
"src": "../../assets/icons/git-branch.svg",
682682
"alt": "Git branching icon",
683683
"width": "120px",
684684
"height": "120px",
@@ -823,7 +823,7 @@
823823
"elements": [
824824
{
825825
"type": "image",
826-
"src": "./assets/icons/github-workflow.svg",
826+
"src": "../../assets/icons/github-workflow.svg",
827827
"alt": "GitHub workflow cycle icon",
828828
"width": "120px",
829829
"height": "120px",
@@ -946,7 +946,7 @@
946946
},
947947
{
948948
"type": "image",
949-
"src": "./assets/icons/git-branch-flow.svg",
949+
"src": "../../assets/icons/git-branch-flow.svg",
950950
"alt": "Git branching diagram showing main branch with feature branch diverging and merging back",
951951
"width": "90%",
952952
"height": "auto",
@@ -1052,7 +1052,7 @@
10521052
},
10531053
{
10541054
"type": "image",
1055-
"src": "./assets/icons/workflow-cycle.svg",
1055+
"src": "../../assets/icons/workflow-cycle.svg",
10561056
"alt": "Full workflow: Issue, Branch, Commits, PR, Merge cycle",
10571057
"width": "90%",
10581058
"height": "auto",

presentations/week-02/presentation.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
"elements": [
182182
{
183183
"type": "image",
184-
"src": "./assets/icons/claude-face.svg",
184+
"src": "../../assets/icons/claude-face.svg",
185185
"alt": "Claude face icon with wink animation",
186186
"width": "140px",
187187
"height": "140px",
@@ -426,7 +426,7 @@
426426
},
427427
{
428428
"type": "image",
429-
"src": "./assets/icons/interfaces.svg",
429+
"src": "../../assets/icons/interfaces.svg",
430430
"alt": "Claude Code interface diagram showing Terminal, VS Code, Desktop, Web, JetBrains",
431431
"width": "280px",
432432
"height": "280px",
@@ -528,7 +528,7 @@
528528
},
529529
{
530530
"type": "image",
531-
"src": "./assets/screenshots/vscode-claude.png",
531+
"src": "../../assets/screenshots/vscode-claude.png",
532532
"alt": "Claude Code in VS Code",
533533
"width": "100%",
534534
"position": {
@@ -537,7 +537,7 @@
537537
},
538538
{
539539
"type": "image",
540-
"src": "./assets/screenshots/code-app.png",
540+
"src": "../../assets/screenshots/code-app.png",
541541
"alt": "Claude Code Desktop App",
542542
"width": "100%",
543543
"position": {
@@ -567,7 +567,7 @@
567567
"elements": [
568568
{
569569
"type": "image",
570-
"src": "./assets/icons/claude-code.svg",
570+
"src": "../../assets/icons/claude-code.svg",
571571
"alt": "Terminal with Claude Code",
572572
"width": "120px",
573573
"height": "120px",
@@ -729,7 +729,7 @@
729729
"elements": [
730730
{
731731
"type": "image",
732-
"src": "./assets/icons/claude-md.svg",
732+
"src": "../../assets/icons/claude-md.svg",
733733
"alt": "CLAUDE.md document icon",
734734
"width": "120px",
735735
"height": "120px",
@@ -846,7 +846,7 @@
846846
},
847847
{
848848
"type": "image",
849-
"src": "./assets/screenshots/init.png",
849+
"src": "../../assets/screenshots/init.png",
850850
"alt": "Screenshot of /init generating a CLAUDE.md file",
851851
"width": "100%",
852852
"position": {
@@ -1304,7 +1304,7 @@
13041304
"elements": [
13051305
{
13061306
"type": "image",
1307-
"src": "./assets/icons/plugin-ecosystem.svg",
1307+
"src": "../../assets/icons/plugin-ecosystem.svg",
13081308
"alt": "Plugin ecosystem diagram",
13091309
"width": "140px",
13101310
"height": "140px",
@@ -1359,7 +1359,7 @@
13591359
},
13601360
{
13611361
"type": "image",
1362-
"src": "./assets/icons/plugin-ecosystem.svg",
1362+
"src": "../../assets/icons/plugin-ecosystem.svg",
13631363
"alt": "Plugin ecosystem: Plugin contains Skills, Hooks, Agents, MCP. Below: CLAUDE.md and Auto Memory always loaded.",
13641364
"width": "45%",
13651365
"position": {
@@ -1841,7 +1841,7 @@
18411841
},
18421842
{
18431843
"type": "image",
1844-
"src": "./assets/icons/plan-mode.svg",
1844+
"src": "../../assets/icons/plan-mode.svg",
18451845
"alt": "Plan mode workflow: Explore, Plan, Implement, Commit",
18461846
"width": "35%",
18471847
"position": {
@@ -1913,7 +1913,7 @@
19131913
},
19141914
{
19151915
"type": "image",
1916-
"src": "./assets/screenshots/plan.png",
1916+
"src": "../../assets/screenshots/plan.png",
19171917
"alt": "Screenshot of Claude Code in plan mode",
19181918
"width": "100%",
19191919
"position": {
@@ -2139,7 +2139,7 @@
21392139
"elements": [
21402140
{
21412141
"type": "image",
2142-
"src": "./assets/icons/context-directory.svg",
2142+
"src": "../../assets/icons/context-directory.svg",
21432143
"alt": ".context/ directory structure",
21442144
"width": "120px",
21452145
"height": "120px",
@@ -2619,7 +2619,7 @@
26192619
"elements": [
26202620
{
26212621
"type": "image",
2622-
"src": "./assets/icons/claude-face.svg",
2622+
"src": "../../assets/icons/claude-face.svg",
26232623
"alt": "Claude face with wink",
26242624
"width": "120px",
26252625
"height": "120px",

0 commit comments

Comments
 (0)