Skip to content

Commit a7a5b4c

Browse files
jongioCopilot
andauthored
Add Astro GitHub Pages site showcasing the extensions (#14)
* Add Astro GitHub Pages site for extensions showcase Scaffold an Astro site under site/ that showcases the six Copilot canvas extensions, with per-card copy-to-clipboard install prompts and screenshot placeholders that fall back to a shared SVG until real images are added. Deploys via the official withastro/action flow from a root workflow pointed at the site/ subfolder; base path is set to /copilot-extensions/. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add live canvas screenshots to the showcase cards Capture each of the six canvas extensions running with real, seeded content (live Yahoo quotes, Google News headlines, a Wikipedia article, a generated Spanish course, a random animal, and the code-tutor onboarding) and drop them into site/public/screenshots/ so the cards render real product shots instead of the placeholder. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add card lightbox and group/reorder the extensions Clicking a card now opens a lightbox with a big version of it (large screenshot, title, description, install prompt + copy, View on GitHub) and prev/next navigation across all extensions via side arrows, arrow keys, Esc to close, and a position counter. Reorder into three groups — Tutors (code-tutor first, then language-tutor), Live & discover (stock-ticker, news-aggregator, wiki-discover), and Just for fun (random-animal) — each rendered as its own labeled section. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add dependency-free smoke test for the showcase site + CI Cover the new interactive site: a build-and-assert smoke test (test/smoke.test.mjs, npm test) verifies the base path, all six extension cards, group order with code-tutor first, the embedded lightbox data, the lightbox markup, and that every card has a real screenshot. Add a site job to the Validate workflow so it runs on every push and PR. Matches the repo's zero-dependency, self-contained test style. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Improve code-tutor screenshot with a seeded curriculum Replace the empty onboarding shot with a populated Learn view (five topics, reading-level slider, progress chips, code-review findings) so the card reflects what the extension does once a codebase is analyzed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Recapture code-tutor from the top (header + logo, no scroll) * Add hover zoom on card screenshots; recapture language-tutor from top Card thumbnails scale to 1.08 on hover/focus with a smooth transition (and a reduced-motion guard). Recapture the language-tutor shot anchored at the top so the profile bar and course header aren't clipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make card hover zoom more pronounced (1.12) * Add sticky topbar with light/dark toggle, GitHub icon, and author byline Match the other gh-pages sites: a sticky header with a brand, nav, a persisted light/dark theme switcher (no-flash, data-theme + localStorage), and a GitHub repo icon. Add a 'by Jon Gallant (jongio)' byline + footer credit. Extend the smoke test to assert the title, theme toggle, and repo link. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 57e6a9a commit a7a5b4c

22 files changed

Lines changed: 6470 additions & 0 deletions

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Astro site to GitHub Pages
2+
3+
# Official Astro → GitHub Pages flow.
4+
# https://docs.astro.build/en/guides/deploy/github/
5+
# Set Settings → Pages → Source to "GitHub Actions".
6+
#
7+
# The Astro project lives in the site/ subfolder, so the build step points at it
8+
# via `path: ./site`.
9+
10+
on:
11+
push:
12+
branches: [main]
13+
paths:
14+
- "site/**"
15+
- ".github/workflows/deploy.yml"
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
concurrency:
24+
group: pages
25+
cancel-in-progress: false
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
- name: Install, build, and upload your site
34+
uses: withastro/action@v2
35+
with:
36+
path: ./site # root of the Astro project
37+
# node-version: 24 # Node version (default 24)
38+
# package-manager: npm # auto-detected from your lockfile
39+
40+
deploy:
41+
needs: build
42+
runs-on: ubuntu-latest
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

.github/workflows/validate.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,24 @@ jobs:
5353

5454
- name: actionlint
5555
uses: raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7 # v2.2.0
56+
57+
site:
58+
name: Build & test site
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 5
61+
permissions:
62+
contents: read
63+
steps:
64+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
65+
with:
66+
persist-credentials: false
67+
68+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
69+
with:
70+
node-version: 22
71+
72+
- run: npm ci || npm install
73+
working-directory: site
74+
75+
- run: npm test
76+
working-directory: site

site/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
# dependencies
6+
node_modules/
7+
# logs
8+
*.log*
9+
# environment
10+
.env
11+
.env.production
12+
# macOS
13+
.DS_Store

site/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copilot Extensions
2+
3+
A statically-rendered **[Astro](https://astro.build)** site for GitHub Pages.
4+
5+
Site URL: https://jongio.github.io/copilot-extensions/
6+
7+
## Why this template
8+
9+
- **Fast by default.** Astro ships zero JavaScript unless a component opts into
10+
hydration ("islands").
11+
- **Base path solved.** `site` and `base` in `astro.config.mjs` are set from your
12+
repo, and links use `import.meta.env.BASE_URL`, so a project site at
13+
`/REPO/` and a user site at `/` both work unchanged.
14+
- **Official deploy.** Uses `withastro/action` + `actions/deploy-pages` — the
15+
flow Astro itself documents.
16+
17+
## Develop locally
18+
19+
```sh
20+
npm install
21+
npm run dev # http://localhost:4321
22+
npm run build # outputs to dist/
23+
npm run preview # serve the production build
24+
```
25+
26+
## Deploy
27+
28+
1. Push to a GitHub repo's `main` branch.
29+
2. **Settings → Pages → Source → GitHub Actions**.
30+
3. `.github/workflows/deploy.yml` builds and publishes on every push to `main`.
31+
32+
> If you rename the repo, update `base` in `astro.config.mjs` to `/NEW-NAME/`.
33+
34+
## Structure
35+
36+
```
37+
astro.config.mjs site + base for GitHub Pages
38+
src/
39+
pages/ file-based routes (index.astro, about.astro)
40+
layouts/Layout.astro HTML shell + base-aware nav
41+
components/Card.astro example component
42+
public/ static assets copied verbatim (favicon.svg)
43+
.github/workflows/deploy.yml
44+
```

site/astro.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
4+
// https://docs.astro.build/en/guides/deploy/github/
5+
//
6+
// site — the origin of your deployed site (no path), e.g. https://USER.github.io
7+
// base — the subpath the site is served from. For a *project* site this is
8+
// "/REPO/"; for a *user* site (USER.github.io) it is "/".
9+
//
10+
// The generator fills these in from your repo. Internal links use
11+
// `import.meta.env.BASE_URL` so they stay correct at any base.
12+
export default defineConfig({
13+
site: "https://jongio.github.io",
14+
base: "/copilot-extensions/",
15+
});

0 commit comments

Comments
 (0)