Skip to content

Commit cabaa8d

Browse files
GeekTrainerCopilot
andcommitted
refactor: use README.md for folder landing pages
github.com auto-renders a folder's README.md when browsing into it, but not index.md — so with the content-first layout the harness and locale folders showed a bare file list instead of their landing page. Rename every folder landing from index.md to README.md and add an explicit slug: to each so Starlight keeps routing it to the same URL (the site already used this mechanism for the root docs/README.md via slug: index). - docs/<harness>/README.md → slug: <harness> - docs/<locale>/README.md → slug: <locale> - docs/<locale>/<harness>/README.md → slug: <locale>/<harness> Update the authoring docs, copilot-instructions, astro instructions, and the localizations skill to document the README-landing + slug convention (including that localized landings must use locale-prefixed slugs). Build verified: 217 workshop pages, routes preserved, translations render. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 64357866-3a3f-4fd8-914b-77826de5be5a
1 parent ae9c942 commit cabaa8d

19 files changed

Lines changed: 33 additions & 6 deletions

File tree

‎.github/copilot-instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repo hosts the **workshop content** for *Agents in SDLC*, published as an A
88

99
- `docs/`**Source Markdown for all lessons. Edit here.** Browsable directly on github.com; no build required.
1010
- `README.md` — Workshop landing page (also the site home via `slug: index` frontmatter).
11-
- `cli/`, `vscode/`, `cloud/`, `app/` — Per-harness lessons (Copilot CLI / VS Code / Cloud agent / GitHub Copilot app). Each harness opens with its own `0-prerequisites.md` setup lesson; the CLI and VS Code harnesses set up a codespace, while the app and cloud harnesses cover the setup their flow needs (for the app, installing Node.js locally and creating the project from the template).
11+
- `cli/`, `vscode/`, `cloud/`, `app/` — Per-harness lessons (Copilot CLI / VS Code / Cloud agent / GitHub Copilot app). Each folder's landing page is a `README.md` (routed via a `slug:` matching the folder path). Each harness opens with its own `0-prerequisites.md` setup lesson; the CLI and VS Code harnesses set up a codespace, while the app and cloud harnesses cover the setup their flow needs (for the app, installing Node.js locally and creating the project from the template).
1212
- `es-es/`, `ja-jp/`, `ko-kr/`, `pt-br/`, `zh-cn/` — Localized content at the locale-root paths required by Starlight. Translated pages mirror the English path beneath each locale directory; untranslated pages use Starlight's English fallback.
1313
- `_images/` — Screenshots and diagrams (shared across all locales).
1414
- `website/` — Optional Astro + Starlight site that publishes `docs/` to GitHub Pages (loader `base: '../docs'`). Only needed to self-host or preview the rendered site.

‎.github/instructions/astro.instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ applyTo: 'website/**/*.{astro,mjs,ts,js}'
1212
- Base path: `/agents-in-sdlc` (the repo's GitHub Pages slug).
1313
- Site URL: `https://github-samples.github.io/agents-in-sdlc/`.
1414
- **Sidebar: manually maintained** in `astro.config.mjs`. The `sidebar` array drives both the order learners see and which pages appear in navigation. New lessons must be added explicitly.
15-
- **Content collection** is sourced from the repo-root `docs/` directory via the custom `glob()` loader in `src/content.config.ts` (`base: '../docs'`). That loader excludes underscore-prefixed files and directories so support assets such as `_images/` don't get routed as pages. The home page (`/`) comes from `docs/README.md` (its `slug: index` frontmatter maps it to the site root).
15+
- **Content collection** is sourced from the repo-root `docs/` directory via the custom `glob()` loader in `src/content.config.ts` (`base: '../docs'`). That loader excludes underscore-prefixed files and directories so support assets such as `_images/` don't get routed as pages. Folder landing pages are `README.md` files (so they render on github.com) rather than Starlight's default `index.md`; each carries a `slug:` in its frontmatter to reproduce the route it would otherwise get from an index file — `docs/README.md` `slug: index` (site home `/`), `docs/<harness>/README.md``slug: <harness>`, and localized landings use the locale-prefixed slug (`docs/<locale>/README.md``slug: <locale>`, `docs/<locale>/<harness>/README.md``slug: <locale>/<harness>`).
1616

1717
## Don't add app-style components
1818

‎.github/skills/localizations/SKILL.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ The skill takes input content and a list of target locales. It then translates t
1818
└── docs/ ← workshop content (source + locale outputs)
1919
├── README.md ← landing page (source; slug: index)
2020
├── <harness>/ ← English lessons (source)
21+
│ ├── README.md ← harness landing (source; slug: <harness>)
2122
│ └── *.md
2223
├── _images/ ← shared assets (not localized)
2324
└── <locale>/ ← localized output, direct child of docs/
24-
├── index.md
25-
└── <any/path>/
25+
├── README.md ← locale landing (slug: <locale>)
26+
└── <harness>/
27+
├── README.md ← localized harness landing (slug: <locale>/<harness>)
2628
└── *.md
2729
```
2830

@@ -64,7 +66,7 @@ The process runs in two passes. First, the content is analyzed to identify key p
6466

6567
Regardless of locale, the following must be preserved exactly and **not** translated:
6668

67-
- YAML frontmatter **keys** (translate values only where appropriate, e.g. a `title`).
69+
- YAML frontmatter **keys** (translate values only where appropriate, e.g. a `title`). **Exception — the `slug` key on landing pages (`README.md`):** the site routes each folder landing via its `slug`, so a localized landing must carry a **locale-prefixed** slug rather than the English one. Rewrite it: a locale root (`docs/<locale>/README.md`) uses `slug: <locale>`, and a localized harness landing (`docs/<locale>/<harness>/README.md`) uses `slug: <locale>/<harness>`. Never copy the English `slug: index` / `slug: <harness>` verbatim into a localized file — that would collide with the English route.
6870
- Fenced and inline code, including variable, function, and command names.
6971
- URLs and external link targets.
7072
- HTML tags, Markdown structure, tables, and admonition markers.

‎AUTHORING.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,17 @@ agents-in-sdlc/
6262
5. **Register in the sidebar.** Open `website/astro.config.mjs` and add an entry to the appropriate `items: []` block. The sidebar is *manually* maintained — order in the file is the order learners see.
6363
6. **Preview and verify, then open a PR.** Preview locally and run the verification sequence before committing — see [Building and verifying](#building-and-verifying) below. CI runs the Astro build and the lychee link check; both must pass.
6464

65+
### Landing pages (folder `README.md`)
66+
67+
Every folder's landing page is a `README.md` so it renders directly when someone browses that folder on github.com. Because Starlight normally derives a folder's index route from an `index.md`, each landing carries an explicit `slug:` in its frontmatter that reproduces the route:
68+
69+
- `docs/README.md``slug: index` (site home `/`).
70+
- `docs/<harness>/README.md``slug: <harness>` (e.g. `slug: app``/app/`).
71+
- `docs/<locale>/README.md``slug: <locale>` (e.g. `slug: es-es``/es-es/`).
72+
- `docs/<locale>/<harness>/README.md``slug: <locale>/<harness>` (e.g. `slug: es-es/app``/es-es/app/`).
73+
74+
When you add a new harness or locale landing, name it `README.md` and set its `slug:` to match the folder path. Localized landings must use the locale-prefixed slug, never the English one.
75+
6576
### Add an image
6677

6778
1. **Drop the file** in `docs/_images/` (or a path-scoped `cli/_images/` etc. when the image is path-specific). Use lowercase-with-hyphens filenames; prefix with `shared-` if the image is referenced from multiple harnesses.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For PR/CI rules, see **[CONTRIBUTING.md](./CONTRIBUTING.md)**.
2121

2222
- **`docs/`****Lesson source (plain Markdown). Edit here.** Browsable directly on github.com, no build required.
2323
- `README.md` — Workshop landing page (also the published site's home via `slug: index`).
24-
- `cli/`, `vscode/`, `cloud/`, `app/` — Per-harness lessons (Copilot CLI / VS Code / cloud agent / GitHub Copilot app). Each codespace-based harness opens with its own `0-prerequisites.md` setup lesson.
24+
- `cli/`, `vscode/`, `cloud/`, `app/` — Per-harness lessons (Copilot CLI / VS Code / cloud agent / GitHub Copilot app). Each codespace-based harness opens with its own `0-prerequisites.md` setup lesson, and a folder `README.md` (routed via a `slug:` matching the folder) is its landing page.
2525
- `es-es/`, `ja-jp/`, `ko-kr/`, `pt-br/`, `zh-cn/` — Translated locale trees (currently the app harness).
2626
- `_images/` — Screenshots and diagrams (shared across all locales).
2727
- **`website/`** — Optional Astro + Starlight site that publishes `docs/` to GitHub Pages. Only needed to self-host or preview the rendered site.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
slug: app
23
title: "GitHub Copilot app"
34
authors:
45
- geektrainer
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
slug: cli
23
title: "GitHub Copilot CLI"
34
authors:
45
- geektrainer
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
slug: cloud
23
title: "Copilot cloud agent"
34
authors:
45
- geektrainer
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
slug: es-es
23
title: "Agentes en el ciclo de vida del desarrollo de software (SDLC)"
34
authors:
45
- geektrainer
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
slug: es-es/app
23
title: "Aplicación GitHub Copilot"
34
authors:
45
- geektrainer

0 commit comments

Comments
 (0)