Skip to content

Commit 2dfcc2c

Browse files
committed
Init website
0 parents  commit 2dfcc2c

61 files changed

Lines changed: 9390 additions & 0 deletions

Some content is hidden

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

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy to GitHub 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 Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build Astro site
34+
run: npm run build
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./dist
40+
41+
deploy:
42+
needs: build
43+
runs-on: ubuntu-latest
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
.astro/
4+
.DS_Store
5+
.env
6+
.env.*

README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Trace Studio Homepage
2+
3+
Static homepage for the [Trace Studio](https://github.com/trace-studio) GitHub organization. Built with [Astro](https://astro.build/), TypeScript, and vanilla CSS.
4+
5+
## Development
6+
7+
```bash
8+
# Install dependencies
9+
npm install
10+
11+
# Start dev server (http://localhost:4321)
12+
npm run dev
13+
14+
# Production build
15+
npm run build
16+
17+
# Preview production build
18+
npm run preview
19+
```
20+
21+
## Adding Content
22+
23+
### Add a Game
24+
25+
Create a markdown file at `src/content/games/en/<slug>.md`:
26+
27+
```markdown
28+
---
29+
title: "Game Name"
30+
slug: "game-name"
31+
status: "released" # released | in-progress | planned
32+
summary: "One-line description."
33+
repoUrl: "https://github.com/trace-studio/game-name"
34+
demoUrl: "https://game-name.trace-studio.github.io"
35+
tags: ["strategy", "card-game"]
36+
components: ["engine", "heuristic", "rl", "llm", "web-demo", "report"]
37+
locale: "en"
38+
publishDate: 2025-01-01
39+
order: 1
40+
---
41+
42+
Markdown body here.
43+
```
44+
45+
### Add a Research Post
46+
47+
Create a markdown file at `src/content/research/en/<slug>.md`:
48+
49+
```markdown
50+
---
51+
title: "Post Title"
52+
slug: "post-slug"
53+
game: "game-name" # optional — links to a game
54+
summary: "One-line summary."
55+
authors: ["Author Name"]
56+
publishDate: 2025-01-15
57+
tags: ["heuristic", "game-ai"]
58+
locale: "en"
59+
draft: false
60+
---
61+
62+
Markdown body here.
63+
```
64+
65+
## Locales
66+
67+
- English: `/` (active)
68+
- Chinese: `/zh/` (stubbed — translation not yet populated)
69+
70+
All UI strings are in `src/i18n/en.json` and `src/i18n/zh.json`. The `zh.json` file has empty values that fall back to English.
71+
72+
## Project Structure
73+
74+
```
75+
src/
76+
├── components/ # Astro components (layout, ui, home, games, research)
77+
├── content/ # Markdown content collections
78+
├── i18n/ # Locale string files
79+
├── lib/ # i18n helpers
80+
├── pages/ # Route pages
81+
└── styles/ # Global CSS, tokens, typography, prose
82+
public/
83+
├── assets/brand/ # Logo and banner images
84+
└── favicon.svg
85+
```
86+
87+
## Deployment
88+
89+
See [docs/deployment.md](docs/deployment.md) for GitHub Pages deployment options.

astro.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineConfig } from "astro/config";
2+
import sitemap from "@astrojs/sitemap";
3+
4+
export default defineConfig({
5+
site: "https://trace-studio.github.io",
6+
base: "/homepage",
7+
integrations: [sitemap()],
8+
i18n: {
9+
defaultLocale: "en",
10+
locales: ["en", "zh"],
11+
routing: {
12+
prefixDefaultLocale: false,
13+
},
14+
},
15+
});

docs/deployment.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Deployment
2+
3+
Two deployment paths for GitHub Pages.
4+
5+
## Option 1: Deploy from this repository
6+
7+
If the site is hosted from the `ts-homepage` repo (e.g., `trace-studio.github.io/ts-homepage`):
8+
9+
```js
10+
// astro.config.mjs
11+
export default defineConfig({
12+
site: "https://trace-studio.github.io",
13+
base: "/ts-homepage",
14+
// ...
15+
});
16+
```
17+
18+
## Option 2: Deploy as the organization site
19+
20+
If this repo is renamed to `trace-studio.github.io` (the org-level GitHub Pages repo):
21+
22+
```js
23+
// astro.config.mjs
24+
export default defineConfig({
25+
site: "https://trace-studio.github.io",
26+
// no base needed — serves from root
27+
// ...
28+
});
29+
```
30+
31+
## Build Command
32+
33+
```bash
34+
npm run build
35+
```
36+
37+
Output is in `dist/`. Point GitHub Pages to serve from the `dist/` directory (or use a GitHub Action to build and deploy).
38+
39+
## GitHub Actions (future)
40+
41+
A workflow file at `.github/workflows/deploy.yml` can automate builds on push to `main`. This is not included in v1 — add it when ready to deploy.

0 commit comments

Comments
 (0)