Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
4 changes: 4 additions & 0 deletions site/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions site/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
22 changes: 22 additions & 0 deletions site/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Development

When starting the dev server, use background mode:

```
astro dev --background
```

Manage the background server with `astro dev stop`, `astro dev status`, and `astro dev logs`.

## Documentation

Full documentation: https://docs.astro.build

Consult these guides before working on related tasks:

- [Adding pages, dynamic routes, or middleware](https://docs.astro.build/en/guides/routing/)
- [Working with Astro components](https://docs.astro.build/en/basics/astro-components/)
- [Using React, Vue, Svelte, or other framework components](https://docs.astro.build/en/guides/framework-components/)
- [Adding or managing content](https://docs.astro.build/en/guides/content-collections/)
- [Adding styles or using Tailwind](https://docs.astro.build/en/guides/styling/)
- [Supporting multiple languages](https://docs.astro.build/en/guides/internationalization/)
1 change: 1 addition & 0 deletions site/CLAUDE.md
78 changes: 78 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copilot Samples Site

Astro-based multi-page catalog site for browsing sample projects in the repository-level `../samples` folder.

## Tech Stack

- Astro 7
- Tailwind CSS v4 (via `@tailwindcss/vite`)
- TypeScript (for data and browser logic modules)

## Routes

- `/` Home page with quick summary stats
- `/samples` Interactive sample browser with search and type filters
- `/about` Implementation notes and catalog overview

## Project Structure

```text
/
├── public/
├── src/
│ ├── components/
│ │ └── SampleBrowser.astro
│ ├── layouts/
│ │ └── SiteLayout.astro
│ ├── lib/
│ │ └── samples.ts
│ ├── pages/
│ │ ├── index.astro
│ │ ├── samples.astro
│ │ └── about.astro
│ ├── scripts/
│ │ └── sample-browser.ts
│ └── styles/
│ └── global.css
├── astro.config.mjs
└── package.json
```

## Responsibilities by Layer

- `src/layouts` provides the shared page frame (header, nav, footer, and global styles).
- `src/pages` is route-level composition only.
- `src/components` contains reusable UI blocks.
- `src/lib/samples.ts` reads local sample metadata and computes summary stats.
- `src/scripts/sample-browser.ts` contains client-side search/filter behavior.
- `src/styles/global.css` holds Tailwind import, theme tokens, and shared component classes.

## Data Source

During build, a prebuild task consolidates metadata from `../samples/*/assets/sample.json` into `public/samples.json`.
The site then reads from this single consolidated source.

If metadata is missing or invalid for an individual sample, fallback values are used during consolidation.

## Local Development

Node.js `>=22.12.0` is required.

```sh
npm install
npm run dev
```

## Build

```sh
npm run build
npm run preview
```

`npm run build` automatically runs `prebuild`, which generates `public/samples.json`.

## Notes

- This site is generated from the local repository structure.
- Add or modify sample folders under `../samples`, then refresh/rebuild the site.
10 changes: 10 additions & 0 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// @ts-check
import { defineConfig } from 'astro/config';
import tailwindcss from '@tailwindcss/vite';

// https://astro.build/config
export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
});
Loading