Skip to content

Commit 7c30c40

Browse files
brunoborgesCopilot
andcommitted
Update docs navigation to use .lab/ multi-step structure
- Update step.html steps array with all .lab/ exercise files - Point GITHUB_RAW_BASE to .lab/ folder - Add processMarkdown logic to strip inline nav and convert .md links - Update index.html to list all 7 workshop parts with step links - Update Start Workshop button to point to 00-overview Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 172969d commit 7c30c40

2 files changed

Lines changed: 76 additions & 16 deletions

File tree

docs/index.html

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<h1>GitHub Copilot for Xcode Workshop</h1>
6363
<p class="hero-subtitle">Learn GitHub Copilot in Xcode with the Landmarks SwiftUI demo app. Explore code completion, Copilot Chat, Agent Mode, Plan Agent, MCP Servers, and Copilot Vision.</p>
6464
<div class="hero-cta">
65-
<a href="step.html?step=readme" class="btn btn-primary">🚀 Start Workshop</a>
65+
<a href="step.html?step=00-overview" class="btn btn-primary">🚀 Start Workshop</a>
6666
<a href="https://github.com/copilot-dev-days/xcode-workshop" class="btn btn-secondary" target="_blank">⭐ GitHub Repo</a>
6767
</div>
6868
<div class="stats">
@@ -71,8 +71,8 @@ <h1>GitHub Copilot for Xcode Workshop</h1>
7171
<div class="stat-label">Duration</div>
7272
</div>
7373
<div class="stat">
74-
<div class="stat-value">1</div>
75-
<div class="stat-label">Guide</div>
74+
<div class="stat-value">7</div>
75+
<div class="stat-label">Parts</div>
7676
</div>
7777
<div class="stat">
7878
<div class="stat-value">6</div>
@@ -112,15 +112,56 @@ <h3>Copilot Vision</h3>
112112

113113
<section class="workshop">
114114
<div class="container">
115-
<h2 class="section-title">Workshop Guide</h2>
115+
<h2 class="section-title">Workshop Parts</h2>
116116
<div class="parts-list">
117-
<a href="step.html?step=readme" class="part-card">
118-
<div class="part-number">📚</div>
117+
<a href="step.html?step=01-setup" class="part-card">
118+
<div class="part-number">01</div>
119119
<div class="part-content">
120-
<h3>Workshop Guide</h3>
121-
<p>Complete walkthrough of Copilot for Xcode features</p>
120+
<h3>Prerequisites & Setup</h3>
121+
<p>Install and configure GitHub Copilot for Xcode</p>
122+
</div>
123+
</a>
124+
<a href="step.html?step=02-chat" class="part-card">
125+
<div class="part-number">02</div>
126+
<div class="part-content">
127+
<h3>Understanding Code with Copilot Chat</h3>
128+
<p>Explore codebases with AI-powered chat assistance</p>
129+
</div>
130+
</a>
131+
<a href="step.html?step=03-completion" class="part-card">
132+
<div class="part-number">03</div>
133+
<div class="part-content">
134+
<h3>Code Completion</h3>
135+
<p>Get intelligent inline suggestions as you write Swift code</p>
136+
</div>
137+
</a>
138+
<a href="step.html?step=04-agent-mode" class="part-card">
139+
<div class="part-number">04</div>
140+
<div class="part-content">
141+
<h3>Agent Mode</h3>
142+
<p>Multi-file refactoring and complex code generation</p>
143+
</div>
144+
</a>
145+
<a href="step.html?step=05-plan-agent" class="part-card">
146+
<div class="part-number">05</div>
147+
<div class="part-content">
148+
<h3>Plan Agent</h3>
149+
<p>Break down complex tasks into actionable steps</p>
150+
</div>
151+
</a>
152+
<a href="step.html?step=06-mcp" class="part-card">
153+
<div class="part-number">06</div>
154+
<div class="part-content">
155+
<h3>GitHub MCP Server</h3>
156+
<p>Extend Copilot with GitHub integration via MCP</p>
157+
</div>
158+
</a>
159+
<a href="step.html?step=07-vision" class="part-card">
160+
<div class="part-number">07</div>
161+
<div class="part-content">
162+
<h3>Copilot Vision (Optional)</h3>
163+
<p>Generate SwiftUI code from UI designs and screenshots</p>
122164
</div>
123-
<span class="part-time">60 min</span>
124165
</a>
125166
</div>
126167
</div>

docs/step.html

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,26 @@
147147

148148
<script>
149149
const steps = [
150-
{ id: 'readme', file: 'README.md', title: 'Workshop Guide', number: '📚' },
150+
{ id: 'guide', file: 'GUIDE.md', title: 'Quick Reference', number: '📚' },
151+
{ id: '00-overview', file: '00-overview.md', title: 'Overview & Checklist', number: '00' },
152+
{ id: '01-setup', file: '01-setup.md', title: 'Prerequisites & Setup', number: '01' },
153+
{ id: '02-chat', file: '02-chat.md', title: 'Copilot Chat', number: '02' },
154+
{ id: '03-completion', file: '03-completion.md', title: 'Code Completion', number: '03' },
155+
{ id: '04-agent-mode', file: '04-agent-mode.md', title: 'Agent Mode', number: '04' },
156+
{ id: '05-plan-agent', file: '05-plan-agent.md', title: 'Plan Agent', number: '05' },
157+
{ id: '06-mcp', file: '06-mcp.md', title: 'MCP Server', number: '06' },
158+
{ id: '07-vision', file: '07-vision.md', title: 'Copilot Vision', number: '07' },
159+
{ id: '08-tips-and-resources', file: '08-tips-and-resources.md', title: 'Tips & Resources', number: '🎉' },
151160
];
152161

153162
const isLocal = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1' || window.location.protocol === 'file:';
154-
const GITHUB_RAW_BASE = isLocal ? '../' : 'https://raw.githubusercontent.com/copilot-dev-days/xcode-workshop/main/';
163+
const GITHUB_RAW_BASE = isLocal ? '../.lab/' : 'https://raw.githubusercontent.com/copilot-dev-days/xcode-workshop/main/.lab/';
155164

156165
let currentStepIndex = 0;
157166

158167
function getStepFromURL() {
159168
const params = new URLSearchParams(window.location.search);
160-
return params.get('step') || 'readme';
169+
return params.get('step') || '00-overview';
161170
}
162171

163172
function buildSidebar() {
@@ -207,11 +216,21 @@
207216
</div>\n`;
208217
});
209218

219+
// Remove header/footer nav lines from markdown (we have our own sidebar/footer nav)
220+
md = md.replace(/\[📚 Lab Guide\][^\n]+\n+---/g, '');
221+
md = md.replace(/\[📚 Lab Guide\][^\n]+/g, '');
222+
md = md.replace(/👉 \*\*\[Continue to[^\n]+/g, '');
223+
md = md.replace(/👉 \*\*\[Start with[^\n]+/g, '');
224+
210225
// Convert internal .md links to step.html links
211-
steps.forEach(step => {
212-
const regex = new RegExp(`\\(${step.file}\\)`, 'g');
213-
md = md.replace(regex, `(step.html?step=${step.id})`);
214-
});
226+
md = md.replace(/\]\((\d+)-([^)]+)\.md\)/g, '](step.html?step=$1-$2)');
227+
md = md.replace(/\]\(GUIDE\.md\)/g, '](step.html?step=guide)');
228+
229+
// Convert links to parent README
230+
md = md.replace(/\]\(\.\.\/README\.md\)/g, '](index.html)');
231+
232+
// Clean up multiple consecutive horizontal rules
233+
md = md.replace(/---\s*\n\s*---/g, '---');
215234

216235
return md;
217236
}

0 commit comments

Comments
 (0)