From 10f03fa157a3a0c85976a9936fc7b7cb65df926c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 21:44:08 +0000 Subject: [PATCH 1/3] Render each workshop page as a closed details section Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- package-lock.json | 6 ++++++ scripts/build-docs.js | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..f0fe7c19 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "gh-aw-workshop", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/scripts/build-docs.js b/scripts/build-docs.js index 52f32a47..bc916a24 100644 --- a/scripts/build-docs.js +++ b/scripts/build-docs.js @@ -59,12 +59,15 @@ const files = fs.readdirSync(workshopDir) .filter(f => f.endsWith('.md')) .sort(); -// Concatenate all markdown with horizontal rule separators -const combinedMarkdown = files - .map(f => fs.readFileSync(path.join(workshopDir, f), 'utf8').trim()) - .join('\n\n---\n\n'); - -const htmlContent = marked(combinedMarkdown); +// Render each file as a closed
section with the first heading as +const htmlContent = files.map(f => { + const markdown = fs.readFileSync(path.join(workshopDir, f), 'utf8').trim(); + // Extract plain text of the first heading (strip leading # characters) + const headingMatch = markdown.match(/^#{1,6}\s+(.+)$/m); + const title = headingMatch ? headingMatch[1].trim() : path.basename(f, '.md'); + const content = marked(markdown); + return `
\n${title}\n${content}\n
`; +}).join('\n\n'); // Set up output directory fs.mkdirSync(distDir, { recursive: true }); From fdd7e8cd01ee4a5baeaf6f51892784751bfd421b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Jul 2026 21:45:07 +0000 Subject: [PATCH 2/3] Improve heading fallback and add comment about workshop file format Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- scripts/build-docs.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/build-docs.js b/scripts/build-docs.js index bc916a24..d5553f26 100644 --- a/scripts/build-docs.js +++ b/scripts/build-docs.js @@ -62,9 +62,14 @@ const files = fs.readdirSync(workshopDir) // Render each file as a closed
section with the first heading as const htmlContent = files.map(f => { const markdown = fs.readFileSync(path.join(workshopDir, f), 'utf8').trim(); - // Extract plain text of the first heading (strip leading # characters) + // Extract plain text of the first heading (strip leading # characters). + // Workshop files use HTML comments (not YAML frontmatter), so the multiline + // regex safely finds the first heading regardless of leading comment lines. const headingMatch = markdown.match(/^#{1,6}\s+(.+)$/m); - const title = headingMatch ? headingMatch[1].trim() : path.basename(f, '.md'); + const slug = path.basename(f, '.md').replace(/^\d+-?/, '').replace(/-/g, ' '); + const title = headingMatch + ? headingMatch[1].trim() + : slug.charAt(0).toUpperCase() + slug.slice(1); const content = marked(markdown); return `
\n${title}\n${content}\n
`; }).join('\n\n'); From aee1a4b4e15361ec703b0dcb5305ce001ab7ddf7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Jul 2026 03:25:48 +0000 Subject: [PATCH 3/3] Wrap summary title in h2 tag inside details sections Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- scripts/build-docs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-docs.js b/scripts/build-docs.js index d5553f26..e744a983 100644 --- a/scripts/build-docs.js +++ b/scripts/build-docs.js @@ -71,7 +71,7 @@ const htmlContent = files.map(f => { ? headingMatch[1].trim() : slug.charAt(0).toUpperCase() + slug.slice(1); const content = marked(markdown); - return `
\n${title}\n${content}\n
`; + return `
\n

${title}

\n${content}\n
`; }).join('\n\n'); // Set up output directory