Skip to content

Commit dbc2b72

Browse files
DanWahlinCopilot
andcommitted
chore(visual-quickstart): rename output to docs/ and build on Node
- Rename the generated site folder visual-quickstart/ -> docs/ - Replace the Python build launcher with build-visual-quickstart.js (Node) - Rename watch-comic.js -> watch-visual-quickstart.js; update package.json scripts to build:visual-quickstart / watch:visual-quickstart - Regenerate the site via the Node engine: accessibility pass (skip link, panel aria text, focus states, forced-colors), crimson accent, caption 'Read in course' pill, and a generic top-level art: config in content.yaml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9ddc311 commit dbc2b72

61 files changed

Lines changed: 511 additions & 128 deletions

Some content is hidden

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

.github/scripts/build-comic.js

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Build the docs visual quickstart site from its content file.
4+
*
5+
* Usage:
6+
* npm run build:visual-quickstart
7+
*
8+
* Edit the words in docs/content.yaml, then run this to regenerate
9+
* the HTML/CSS into docs/. Do NOT hand-edit the generated *.html -
10+
* it is overwritten on every build.
11+
*
12+
* The rendering engine (SVG visual quickstart frames, speech bubbles, auto-placement, etc.)
13+
* lives in the reusable visual-quickstart-generator skill; this is a thin launcher that
14+
* points that engine at this repo's content file and output dir.
15+
*
16+
* Optional env overrides:
17+
* VISUAL_QUICKSTART_SKILL_DIR path to the visual-quickstart-generator skill folder
18+
*/
19+
20+
const { spawnSync } = require('child_process');
21+
const { existsSync } = require('fs');
22+
const { join } = require('path');
23+
const os = require('os');
24+
25+
const repoRoot = join(__dirname, '..', '..'); // .github/scripts -> repo root
26+
const docsDir = join(repoRoot, 'docs');
27+
const contentFile = join(docsDir, 'content.yaml');
28+
29+
const skillDir =
30+
process.env.VISUAL_QUICKSTART_SKILL_DIR ||
31+
join(os.homedir(), '.copilot', 'skills', 'visual-quickstart-generator');
32+
const buildScript = join(skillDir, 'scripts', 'build_site.js');
33+
34+
if (!existsSync(buildScript)) {
35+
console.error(
36+
`\u2716 Visual quickstart engine not found at:\n ${buildScript}\n` +
37+
'Set VISUAL_QUICKSTART_SKILL_DIR to the visual-quickstart-generator skill folder, or install the skill.',
38+
);
39+
process.exit(1);
40+
}
41+
if (!existsSync(contentFile)) {
42+
console.error(`\u2716 Content file not found:\n ${contentFile}`);
43+
process.exit(1);
44+
}
45+
46+
console.log(`Building visual quickstart from ${contentFile}`);
47+
const result = spawnSync(process.execPath, [buildScript], {
48+
stdio: 'inherit',
49+
env: { ...process.env, VISUAL_QUICKSTART_DOCS: docsDir, VISUAL_QUICKSTART_CONTENT: contentFile },
50+
});
51+
52+
if (result.error) {
53+
console.error(`\u2716 Failed to run the engine: ${result.error.message}`);
54+
process.exit(1);
55+
}
56+
process.exit(result.status ?? 0);

.github/scripts/watch-comic.js renamed to .github/scripts/watch-visual-quickstart.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/usr/bin/env node
22
/**
3-
* Watch visual-quickstart/content.yaml and rebuild the comic site on every save.
3+
* Watch docs/content.yaml and rebuild the visual quickstart site on every save.
44
*
55
* Usage:
6-
* npm run watch:comic
6+
* npm run watch:visual-quickstart
77
*
88
* Leave this running while you edit content.yaml. Each time you save the file,
9-
* the comic HTML/CSS is regenerated automatically (same as `npm run build:comic`).
9+
* the visual quickstart HTML/CSS is regenerated automatically (same as `npm run build:visual-quickstart`).
1010
* Press Ctrl+C to stop.
1111
*
1212
* Zero dependencies: uses Node's built-in fs.watch. It watches the directory and
@@ -19,9 +19,9 @@ const { watch, existsSync } = require('fs');
1919
const { join } = require('path');
2020

2121
const repoRoot = join(__dirname, '..', '..'); // .github/scripts -> repo root
22-
const docsDir = join(repoRoot, 'visual-quickstart');
22+
const docsDir = join(repoRoot, 'docs');
2323
const contentFile = join(docsDir, 'content.yaml');
24-
const buildScript = join(__dirname, 'build-comic.js');
24+
const buildScript = join(__dirname, 'build-visual-quickstart.js');
2525
const WATCHED = 'content.yaml';
2626
const DEBOUNCE_MS = 200;
2727

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
22
AUTO-GENERATED - DO NOT EDIT THIS FILE.
3-
It is regenerated by the comic-strip-site skill (build_site.py) and your
3+
It is regenerated by the visual-quickstart-generator skill (build_site.js) and your
44
edits here will be overwritten on the next build.
55
66
How to make changes:
77
- WORDS (page/tab titles, nav labels, site chrome, subtitle, CTA, footer,
88
captions, character dialogue, terminal commands, chapter list): edit
9-
visual-quickstart/content.yaml (see its top-level `site:` section)
10-
- STYLES (CSS): edit the CSS block in build_site.py
11-
- HTML STRUCTURE / layout: edit the page templates in build_site.py
9+
docs/content.yaml (see its top-level `site:` section)
10+
- STYLES (CSS): edit templates/style.css in the skill
11+
- HTML STRUCTURE / layout: edit the page templates in build_site.js
1212
(index_page / chapter_page / banner / nav / panel)
1313
14-
Then rebuild: npm run build:comic
14+
Then rebuild: npm run build:visual-quickstart
1515
*/
1616
:root{
1717
--ink:#1f2937; --cream:#fdf3df; --card:#fce9c7; --teal:#0c7a7a; --accent:#be123c;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)