Skip to content

Commit fba6e2a

Browse files
adileiadileiclaude
authored
Restructure repo: categorized folders + Just the Docs site (#471)
* Reorganize repo into 9 category folders Restructure 34 top-level folders into 9 categories: - authoring/ — solutions (PnP format) and snippets (topics, adaptive cards) - contact-center/ — engagement hub integrations and playbook templates - extensibility/ — A2A, MCP servers, M365 Agents SDK samples - guides/ — implementation guide and hands-on workshop - infrastructure/ — VNet support ARM templates - sso/ — Entra ID, Okta, and Chat API authentication - testing/ — functional (pytest) and load (JMeter) testing - ui/custom-ui/ — standalone chat frontends (Assistant UI, DirectLine JS, reasoning display) - ui/embed/ — platform embeds (ServiceNow, Power Apps PCF, SharePoint, minimizable widget) - EmployeeSelfServiceAgent/ — Workday/facilities topics (pending deprecation) New samples from upstream: account-contact-lookup, resume-job-finder, directline-js, pcf-canvas-app, servicenow-widget. Solution zips exploded into PnP structure with source code. Unified README format across all folders. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add cross-references to M365 Agents SDK samples Link related samples from microsoft/Agents repo in: - extensibility/agents-sdk/ (copilotstudio-client, copilotstudio-skill, multiagent) - ui/custom-ui/ (copilotstudio-webchat-react, copilotstudio-webclient) - sso/ (obo-authorization) - contact-center/ (GenesysHandoff) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add Just the Docs site with search, nav, and GitHub Pages deployment - Jekyll infrastructure: Gemfile, _config.yml, GitHub Actions workflow - Front matter on all ~80 README.md files for 3-level sidebar navigation - Client-side search via lunr.js (321 indexed entries) - Callout config (note/tip/important/warning/caution) replacing GitHub alert syntax - "Browse source on GitHub" button at top of each page - Copilot Studio logo and favicon - Normalized README casing, fixed internal links, Liquid escaping - Exclude patterns for source code, binaries, and build artifacts - Reorganized Contact Center nav (flat: Skill Handoff, Salesforce, ServiceNow) - Moved engagement playbook to Guides - Cross-reference tables (SSO page links to UI samples with auth) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add external sample pages, deprecation labels, and contributor instructions - External nav pages: Genesys Handoff, Copilot Studio Client/Skill, Multi-Agent, WebChat React, Web Client - Custom "View sample in M365 Agents SDK repo" button for external pages - Deprecated labels on Chat API, Multilingual Bot, Relay Bot - Contributor instructions in CLAUDE.md and .github/copilot-instructions.md - Flattened Contact Center nav, moved Engagement Playbook to Guides Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove chat-api sample, add MIGRATION.md with old/new location mapping Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix MIGRATION.md owners to original contributors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove engagement playbook (outdated PVA content) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix owners for Multilingual Bot, Search Species, Pytest Agents SDK Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Point site at microsoft.github.io, trigger workflow on main - _config.yml: url → microsoft.github.io, all links → microsoft/CopilotStudioSamples - pages.yml: trigger on main instead of reorg/v1 - Updated CLAUDE.md, copilot-instructions.md, MIGRATION.md references Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: adilei <adileibowiz@microsoft.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a076b02 commit fba6e2a

File tree

845 files changed

+8126
-405983
lines changed

Some content is hidden

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

845 files changed

+8126
-405983
lines changed

.github/copilot-instructions.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# CopilotStudioSamples — Contributor Instructions
2+
3+
This repo uses **Just the Docs** (Jekyll theme) to generate a documentation site with sidebar navigation and full-text search.
4+
5+
## Adding a New Sample
6+
7+
1. Create a folder under the right category: `authoring/`, `extensibility/`, `ui/`, `contact-center/`, `sso/`, `testing/`, `guides/`, `infrastructure/`
8+
2. Add a `README.md` (exact casing) with YAML front matter:
9+
10+
```yaml
11+
---
12+
title: My Sample # Appears in sidebar nav
13+
parent: Embed # Must match parent page's title exactly
14+
grand_parent: UI # Required for level 3 (grandchild) pages
15+
nav_order: 8 # Numeric position among siblings
16+
---
17+
```
18+
19+
3. Write the README with: description, prerequisites, setup instructions
20+
4. Update the parent category's `## Contents` table to include the new sample
21+
5. Test locally: `bundle install && bundle exec jekyll serve`
22+
23+
### Hierarchy Levels
24+
25+
| Level | Front matter | Example |
26+
|-------|-------------|---------|
27+
| Category | `title`, `nav_order`, `has_children: true`, `has_toc: false` | `ui/README.md` |
28+
| Subcategory | `title`, `parent`, `nav_order`, `has_children: true`, `has_toc: false` | `ui/embed/README.md` |
29+
| Sample | `title`, `parent`, `grand_parent`, `nav_order` | `ui/embed/servicenow-widget/README.md` |
30+
| Deep page | `nav_exclude: true`, `search_exclude: false` | Internal subfolders |
31+
32+
### Power Platform Solutions (`authoring/solutions/`)
33+
34+
Solutions follow the [PnP format](https://github.com/pnp/powerplatform-samples):
35+
36+
```
37+
authoring/solutions/my-solution/
38+
├── README.md # Description, screenshots, install steps
39+
├── assets/ # Screenshots and diagrams
40+
├── solution/ # Packaged .zip file(s) ready to import
41+
└── sourcecode/ # Unpacked source (pac solution unpack)
42+
```
43+
44+
Front matter:
45+
```yaml
46+
---
47+
title: My Solution
48+
parent: Solutions
49+
grand_parent: Authoring
50+
nav_order: 7
51+
---
52+
```
53+
54+
README should include: what it does, screenshots in `assets/`, import steps, connection references to configure, known issues. Update `authoring/solutions/README.md` Contents table after adding.
55+
56+
### External Samples (code in another repo)
57+
58+
Add `external_url` to front matter. This shows a "View sample in M365 Agents SDK repo" button instead of "Browse source on GitHub":
59+
60+
```yaml
61+
---
62+
title: Genesys Handoff
63+
parent: Contact Center
64+
nav_order: 4
65+
external_url: "https://github.com/microsoft/Agents/tree/main/samples/dotnet/GenesysHandoff"
66+
---
67+
```
68+
69+
### Deprecated Samples
70+
71+
Add a red label and caution callout:
72+
73+
```markdown
74+
Deprecated
75+
{: .label .label-red }
76+
77+
{: .caution }
78+
> This sample is deprecated. Use [replacement](../path/) instead.
79+
```
80+
81+
## Markdown Rules
82+
83+
### Callouts — do NOT use GitHub `> [!NOTE]` syntax
84+
85+
Jekyll doesn't support GitHub alerts. Use JTD kramdown callouts:
86+
87+
```markdown
88+
{: .note }
89+
> This is a note.
90+
91+
{: .warning }
92+
> A warning.
93+
94+
{: .tip }
95+
> A tip.
96+
97+
{: .caution }
98+
> A caution.
99+
100+
{: .important }
101+
> Important info.
102+
```
103+
104+
### Links Between Pages
105+
106+
- README links: use directory path `[Sample](./my-sample/)` — NOT `(./my-sample/README.md)`
107+
- Other .md files: drop the extension `[Setup](./SETUP)` — NOT `(./SETUP.md)`
108+
- External URLs: use as-is
109+
110+
### Labels
111+
112+
```markdown
113+
New
114+
{: .label .label-green }
115+
116+
Deprecated
117+
{: .label .label-red }
118+
```
119+
120+
### Liquid Escaping
121+
122+
Markdown containing `{%` (e.g. URL-encoded params) must be wrapped:
123+
124+
````markdown
125+
{% raw %}
126+
```
127+
https://example.com?q={%22key%22:%22value%22}
128+
```
129+
{% endraw %}
130+
````
131+
132+
## Building and Testing Locally
133+
134+
```bash
135+
# Install dependencies (first time only)
136+
bundle install
137+
138+
# Start dev server with live reload
139+
bundle exec jekyll serve
140+
# Site at http://127.0.0.1:4000/CopilotStudioSamples/
141+
142+
# Build without serving (CI check)
143+
bundle exec jekyll build
144+
```
145+
146+
Verify after changes:
147+
- New page appears in sidebar nav
148+
- Search finds the new sample (Ctrl+K)
149+
- Internal links work (no 404s)
150+
- Images render correctly
151+
152+
## Git Workflow
153+
154+
```bash
155+
# Work on the docs branch
156+
git checkout reorg/v1
157+
158+
# Make changes, then commit
159+
git add -A
160+
git commit -m "Add my-new-sample to ui/embed"
161+
162+
# Push to fork — GitHub Actions deploys automatically
163+
git push origin reorg/v1
164+
```
165+
166+
- **Branch**: `reorg/v1` is the docs branch. GitHub Actions builds and deploys to Pages on every push.
167+
- **To merge upstream**: open a PR from `reorg/v1``main`. Update `.github/workflows/pages.yml` to trigger on `main` instead of `reorg/v1` before merging.
168+
- **Remotes**: `origin` = fork (`microsoft/CopilotStudioSamples`), `upstream` = source (`microsoft/CopilotStudioSamples`)
169+
170+
## Config Gotchas
171+
172+
- `_config.yml` exclude patterns match recursively (`*` matches `/` in Jekyll)
173+
- **Never add `*.html` to exclude** — it breaks theme layout files
174+
- File must be named `README.md` (exact casing) for `jekyll-readme-index` to work
175+
- Category READMEs use `has_toc: false` with a manual Contents table

.github/workflows/pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy Jekyll site to Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: "3.3"
28+
bundler-cache: true
29+
30+
- name: Setup Pages
31+
id: pages
32+
uses: actions/configure-pages@v5
33+
34+
- name: Build with Jekyll
35+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
36+
env:
37+
JEKYLL_ENV: production
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,3 +332,8 @@ ASALocalRun/
332332
/sabacha/Dispatcher/dispatcher.bot
333333
SharePointSSOComponent/package-lock.json
334334
SharePointSSOComponent/config/serve.json
335+
336+
# Jekyll
337+
_site/
338+
.jekyll-cache/
339+
.jekyll-metadata

0 commit comments

Comments
 (0)