Skip to content

Commit 40fd1a6

Browse files
aaronpowellCopilot
andauthored
Migrate website to Starlight with full-text resource search (#883)
* Add search functionality to Learning Hub index page Add a client-side search bar that filters articles by title, description, and tags. Sections with no matching results are hidden automatically. Uses the existing .search-bar CSS pattern from the cookbook page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: remove deprecated layouts, theme script, and learning-hub config Phase 5 cleanup of Starlight migration: - Delete BaseLayout.astro (replaced by StarlightPage) - Delete ArticleLayout.astro (replaced by Starlight docs rendering) - Delete theme.ts (Starlight has built-in theme toggle) - Delete src/config/learning-hub.ts (sidebar order now in astro.config.mjs) - Replace learning-hub glob collection with Starlight docs collection in content.config.ts - Keep search.ts (still used by homepage and all resource page scripts) Build verified: 23 pages, no errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Migrate website to Starlight with full-text resource search - Replace bespoke Astro layouts with Starlight integration - Homepage and resource pages use StarlightPage wrapper - Learning Hub articles rendered via Starlight docs collection - Starlight provides search, theme toggle, sidebar, ToC, a11y - Add custom Pagefind integration for resource search - All 614 agents/skills/instructions/hooks/workflows/plugins indexed as custom records with deep-link URLs - Type filter pills (horizontal pill toggles) above results - Search results link directly to resource modals via #file= hash - Move global.css to src/styles/ for Vite processing - Scope CSS reset to #main-content to avoid Starlight conflicts - Full-width page gradient via body:has(#main-content) - Light/dark theme support with Starlight gray scale inversion - Delete old layouts (BaseLayout, ArticleLayout), theme.ts, config Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review feedback - Fix pagefind-resources.ts header comment (pagefind:true not false) - Remove unused base variable in cookbook/index.astro - Replace hardcoded /awesome-copilot/ paths with relative links in index.md - Delete stale public/styles/global.css (source of truth is src/styles/) - Replace fragile getBasePath() with Astro config base in pagefind integration - Document pagefind:true reasoning in astro.config.mjs - Use proper visually-hidden pattern + :focus-visible ring for filter pills - Remove dead header/nav/theme CSS from global.css (~160 lines) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8fedf95 commit 40fd1a6

50 files changed

Lines changed: 1944 additions & 941 deletions

Some content is hidden

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

website/astro.config.mjs

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,85 @@
11
import sitemap from "@astrojs/sitemap";
2+
import starlight from "@astrojs/starlight";
23
import { defineConfig } from "astro/config";
4+
import pagefindResources from "./src/integrations/pagefind-resources";
35

46
// https://astro.build/config
57
export default defineConfig({
68
site: "https://github.github.com/",
79
base: "/awesome-copilot/",
810
output: "static",
9-
integrations: [sitemap()],
11+
integrations: [
12+
starlight({
13+
title: "Awesome GitHub Copilot",
14+
social: [
15+
{
16+
icon: "github",
17+
label: "GitHub",
18+
href: "https://github.com/github/awesome-copilot",
19+
},
20+
],
21+
customCss: ["./src/styles/starlight-overrides.css", "./src/styles/global.css"],
22+
editLink: {
23+
baseUrl:
24+
"https://github.com/github/awesome-copilot/edit/staged/website/",
25+
},
26+
sidebar: [
27+
{
28+
label: "Browse Resources",
29+
items: [
30+
{ label: "Home", link: "/" },
31+
{ label: "Agents", link: "/agents/" },
32+
{ label: "Instructions", link: "/instructions/" },
33+
{ label: "Skills", link: "/skills/" },
34+
{ label: "Hooks", link: "/hooks/" },
35+
{ label: "Workflows", link: "/workflows/" },
36+
{ label: "Plugins", link: "/plugins/" },
37+
{ label: "Tools", link: "/tools/" },
38+
],
39+
},
40+
{
41+
label: "Fundamentals",
42+
items: [
43+
"learning-hub/what-are-agents-skills-instructions",
44+
"learning-hub/understanding-copilot-context",
45+
"learning-hub/copilot-configuration-basics",
46+
"learning-hub/defining-custom-instructions",
47+
"learning-hub/creating-effective-skills",
48+
"learning-hub/building-custom-agents",
49+
"learning-hub/understanding-mcp-servers",
50+
"learning-hub/automating-with-hooks",
51+
"learning-hub/agentic-workflows",
52+
"learning-hub/using-copilot-coding-agent",
53+
"learning-hub/installing-and-using-plugins",
54+
"learning-hub/before-after-customization-examples",
55+
],
56+
},
57+
{
58+
label: "Reference",
59+
items: ["learning-hub/github-copilot-terminology-glossary"],
60+
},
61+
{
62+
label: "Hands-on",
63+
items: [
64+
{
65+
label: "Cookbook",
66+
link: "/learning-hub/cookbook/",
67+
},
68+
],
69+
},
70+
],
71+
disable404Route: true,
72+
// pagefind: true is required so Starlight renders the search UI.
73+
// Our pagefindResources() integration overwrites the index after build.
74+
pagefind: true,
75+
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 3 },
76+
components: {
77+
Head: "./src/components/Head.astro",
78+
},
79+
}),
80+
sitemap(),
81+
pagefindResources(),
82+
],
1083
redirects: {
1184
"/samples/": "/learning-hub/cookbook/",
1285
},

0 commit comments

Comments
 (0)