Normalize content manifests and add repo agent guide
Constraint: Commit only the cleaned JSON manifests and the root AGENTS.md without bundling unrelated local changes
Rejected: Folding in the other modified .codex files | unrelated workspace churn
Confidence: high
Scope-risk: narrow
Directive: Keep generated or synced content formatted with stable JSON indentation to reduce noisy diffs
Tested: node -e "JSON.parse(require('fs').readFileSync('src/content/projects/index.json','utf8')); JSON.parse(require('fs').readFileSync('src/content/static-assets/index.json','utf8')); console.log('json-ok')"; npm run build
Not-tested: Push/deploy after this content-and-docs-only commit
This commit is contained in:
parent
769e679417
commit
3aa966f3d5
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Repository Guidelines
|
||||||
|
|
||||||
|
## Project Structure & Module Organization
|
||||||
|
This repo is an Astro-based personal homepage with build-time data syncing. Main app code lives in `src/`: reusable UI in `src/components`, page routes in `src/pages`, layouts in `src/layouts`, shared helpers in `src/utils`, and site/data config in `src/config.ts`, `src/content.config.ts`, and `src/data/`. Editable content lives under `src/content/` (`logs/`, `projects/`, `shares/`, `seafile/`, `static-assets/`). Generated sync output is written to `src/data/generated/`; treat it as build output. Static public files belong in `public/`, deployment assets in `docker/`, and operational notes in `docs/`.
|
||||||
|
|
||||||
|
## Build, Test, and Development Commands
|
||||||
|
- `npm install` — install dependencies (Node `>=22.12.0`).
|
||||||
|
- `npm run dev` — start the Astro dev server.
|
||||||
|
- `npm run build` — create a production build in `dist/`.
|
||||||
|
- `npm run preview` — serve the built site locally.
|
||||||
|
- `npm run content:sync` — pull remote content and refresh generated JSON.
|
||||||
|
- `npm run assets:sync` — download static assets listed in `src/content/static-assets/index.json`.
|
||||||
|
- `npm run rebuild` — full validation path: sync content, then build.
|
||||||
|
|
||||||
|
## Coding Style & Naming Conventions
|
||||||
|
Use TypeScript ESM and Astro components with 2-space indentation. Keep components in PascalCase (`ProjectCard.astro`), utilities in camelCase (`datetime.ts`), and CSS classes in kebab-case with BEM-style modifiers when helpful (`activity-item__meta`). Prefer small, focused modules and reuse existing loaders/schemas before adding new abstractions. Keep content JSON filenames stable as `index.json` within each content folder.
|
||||||
|
|
||||||
|
## Testing Guidelines
|
||||||
|
There is no dedicated test framework configured yet. For code or content changes, run `npm run build`; for sync-related work, run `npm run rebuild`. Treat a clean build as the minimum acceptance check, and verify changed pages in `npm run preview` when UI or content rendering changes.
|
||||||
|
|
||||||
|
## Commit & Pull Request Guidelines
|
||||||
|
Recent history favors short, intent-first commit subjects in either English or Chinese. For new commits, keep the subject concise and explain why the change exists; include Lore trailers when applicable (`Constraint:`, `Rejected:`, `Confidence:`, `Tested:`). Pull requests should summarize the user-visible change, list affected paths, note any `.env` or content-schema updates, and include screenshots for visual changes. Always report which validation commands you ran.
|
||||||
|
|
||||||
|
## Security & Configuration Tips
|
||||||
|
Copy `.env.example` to `.env` for local setup, and never commit secrets such as Gitea or Seafile tokens. When editing sync scripts in `scripts/`, document any new environment variables or external dependencies in `README.md` or `docs/`.
|
||||||
|
|
@ -6,29 +6,56 @@
|
||||||
"cover_image": "/images/projects/personal-homepage.svg",
|
"cover_image": "/images/projects/personal-homepage.svg",
|
||||||
"demo_video": "",
|
"demo_video": "",
|
||||||
"download_link": "",
|
"download_link": "",
|
||||||
"tags": ["astro", "静态网站", "内容驱动型"],
|
"tags": [
|
||||||
|
"astro",
|
||||||
|
"静态网站",
|
||||||
|
"内容驱动型"
|
||||||
|
],
|
||||||
"featured": true
|
"featured": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VampireLike",
|
"name": "VampireLike",
|
||||||
"description": "Unity 开发的 3D 类吸血鬼恶魔城 demo,使用 Unity GameFramework 开源框架,并通过 job 与 burst 进行高性能计算",
|
"description": "Unity 开发的 3D 类吸血鬼恶魔城 demo,使用 Unity GameFramework 开源框架,并通过 job 与 burst 进行高性能计算",
|
||||||
"gitea_repo": "basil/VampireLike",
|
"gitea_repo": "basil/vampire-like",
|
||||||
"cover_image": "/images/projects/VampireLike.png",
|
"cover_image": "/images/projects/vampire-like.png",
|
||||||
"demo_video": "",
|
"demo_video": "",
|
||||||
"download_link": "",
|
"download_link": "",
|
||||||
"tags": ["unity", "burst", "高性能", "UGF"],
|
"tags": [
|
||||||
|
"unity",
|
||||||
|
"burst",
|
||||||
|
"高性能",
|
||||||
|
"UGF"
|
||||||
|
],
|
||||||
"featured": true
|
"featured": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "几何塔防",
|
"name": "几何塔防",
|
||||||
"description": "Unity 开发的 rouge 塔防项目,使用配件自由组转防御塔来取得最终的胜利",
|
"description": "Unity 开发的 rouge 塔防项目,使用配件自由组转防御塔来取得最终的胜利",
|
||||||
"gitea_repo": "basil/Geometry-Tower-Defense",
|
"gitea_repo": "basil/geometry-tower-defense",
|
||||||
"cover_image": "/images/projects/Geometry-Tower-Defense.png",
|
"cover_image": "/images/projects/geometry-tower-defense.png",
|
||||||
"demo_video": "",
|
"demo_video": "",
|
||||||
"download_link": "",
|
"download_link": "",
|
||||||
"tags": ["unity", "rouge", "塔防", "UGF"],
|
"tags": [
|
||||||
|
"unity",
|
||||||
|
"rouge",
|
||||||
|
"塔防",
|
||||||
|
"UGF"
|
||||||
|
],
|
||||||
"featured": true
|
"featured": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "几何塔防-基础",
|
||||||
|
"description": "几何塔防的基础层,使用纯 C# 开发",
|
||||||
|
"gitea_repo": "basil/geometry-tower-defense-Bbase",
|
||||||
|
"cover_image": "/images/projects/geometry-tower-defense.png",
|
||||||
|
"demo_video": "",
|
||||||
|
"download_link": "",
|
||||||
|
"tags": [
|
||||||
|
"c#",
|
||||||
|
"UGF"
|
||||||
|
],
|
||||||
|
"featured": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "简单 CPU 软光栅渲染器",
|
"name": "简单 CPU 软光栅渲染器",
|
||||||
"description": "使用 C++ 基于 SDL2 开发的软件光栅化渲染器",
|
"description": "使用 C++ 基于 SDL2 开发的软件光栅化渲染器",
|
||||||
|
|
@ -36,17 +63,26 @@
|
||||||
"cover_image": "/images/projects/CPU-Renderer.png",
|
"cover_image": "/images/projects/CPU-Renderer.png",
|
||||||
"demo_video": "",
|
"demo_video": "",
|
||||||
"download_link": "",
|
"download_link": "",
|
||||||
"tags": ["C++", "renderer", "SDL2"],
|
"tags": [
|
||||||
|
"C++",
|
||||||
|
"renderer",
|
||||||
|
"SDL2"
|
||||||
|
],
|
||||||
"featured": false
|
"featured": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "李诫传",
|
"name": "李诫传",
|
||||||
"description": "Unity 开发的视觉小说,用于参加计算机设计大赛数媒赛道",
|
"description": "Unity 开发的视觉小说,用于参加计算机设计大赛数媒赛道",
|
||||||
"gitea_repo": "basil/Biography-of-Li-Jie",
|
"gitea_repo": "basil/biography-of-lijie",
|
||||||
"cover_image": "/images/projects/Biography-of-Li-Jie.png",
|
"cover_image": "/images/projects/biography-of-lijie.png",
|
||||||
"demo_video": "",
|
"demo_video": "",
|
||||||
"download_link": "",
|
"download_link": "",
|
||||||
"tags": ["unity", "visual novel", "UGF", "ai"],
|
"tags": [
|
||||||
|
"unity",
|
||||||
|
"visual novel",
|
||||||
|
"UGF",
|
||||||
|
"ai"
|
||||||
|
],
|
||||||
"featured": false
|
"featured": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"url": "http://106.12.111.150:8000/f/cfb44c4a96234a939ed2/?dl=1",
|
"url": "http://106.12.111.150:8000/f/cfb44c4a96234a939ed2/?dl=1",
|
||||||
"filename": "VampireLike.png"
|
"filename": "vampire-like.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "http://106.12.111.150:8000/f/85e956b2a4f14ff9bca8/?dl=1",
|
"url": "http://106.12.111.150:8000/f/85e956b2a4f14ff9bca8/?dl=1",
|
||||||
"filename": "Geometry-Tower-Defense.png"
|
"filename": "geometry-tower-defense.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "http://106.12.111.150:8000/f/7f6ac5bd1b094db5ae95/?dl=1",
|
"url": "http://106.12.111.150:8000/f/7f6ac5bd1b094db5ae95/?dl=1",
|
||||||
|
|
@ -16,14 +16,13 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "http://106.12.111.150:8000/f/1ac8ebc9936b490586be/?dl=1",
|
"url": "http://106.12.111.150:8000/f/1ac8ebc9936b490586be/?dl=1",
|
||||||
"filename": "Biography-of-Li-Jie.png"
|
"filename": "biography-of-lijie.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"target_dir": "public/images/gallery",
|
"target_dir": "public/images/gallery",
|
||||||
"files":
|
"files": [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
"url": "http://106.12.111.150:8000/f/0d357852716f492eb92f/?dl=1",
|
"url": "http://106.12.111.150:8000/f/0d357852716f492eb92f/?dl=1",
|
||||||
"filename": "Alphys.png"
|
"filename": "Alphys.png"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue