From 840122e30af0ee122bd62f0434a3304b308af521 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 14:45:16 +0800 Subject: [PATCH 01/17] style(header): refine header background and showcase image alignment - separate background overlay from content container in Header for better layout control - adjust PC showcase image positioning and size for improved visual alignment --- src/components/home/Header.astro | 3 ++- src/components/home/HeaderShowCase.astro | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/home/Header.astro b/src/components/home/Header.astro index d6d45a0..69776da 100644 --- a/src/components/home/Header.astro +++ b/src/components/home/Header.astro @@ -126,7 +126,8 @@ import HomeAdGroup from "./HomeAdGroup.astro";
-
+
+

Animeko diff --git a/src/components/home/HeaderShowCase.astro b/src/components/home/HeaderShowCase.astro index 7bcb16e..94da89d 100644 --- a/src/components/home/HeaderShowCase.astro +++ b/src/components/home/HeaderShowCase.astro @@ -4,7 +4,7 @@

From 1c7d4befe7de122b07ba0325a1e5e199204bcbc5 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 14:48:19 +0800 Subject: [PATCH 02/17] feat(opencode): enable LSP for AI development - add .opencode/opencode.json config with lsp: true - improve development experience through language server protocol --- .opencode/opencode.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .opencode/opencode.json diff --git a/.opencode/opencode.json b/.opencode/opencode.json new file mode 100644 index 0000000..9cc8361 --- /dev/null +++ b/.opencode/opencode.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://opencode.ai/config.json", + "lsp": true +} From a7fae1f95347d328009597d68294080aa749ee1b Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 14:49:23 +0800 Subject: [PATCH 03/17] feat(home): add smooth scroll from features to FAQ section - add id and fullscreen layout classes to FAQ section - implement wheel event listener for auto-scrolling to FAQ - clean up event listener on page navigation --- src/components/home/FAQ.astro | 2 +- src/components/home/Features.astro | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/components/home/FAQ.astro b/src/components/home/FAQ.astro index 80f07b1..0bd0647 100644 --- a/src/components/home/FAQ.astro +++ b/src/components/home/FAQ.astro @@ -6,7 +6,7 @@ interface Props { const { isIndex } = Astro.props; --- -
+

{isIndex ? 常见问题 : "常见问题"} diff --git a/src/components/home/Features.astro b/src/components/home/Features.astro index 67b440b..117c8a1 100644 --- a/src/components/home/Features.astro +++ b/src/components/home/Features.astro @@ -2,7 +2,34 @@ import FeatureCard from "./FeatureCard.astro"; --- -
+ + +
From 4ad270ea92e0475a221f3cacd30c8cd56213a02e Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 14:52:04 +0800 Subject: [PATCH 04/17] refactor(opencode): move lsp setting to root config - removed .opencode/opencode.json for simplification - added lsp: true to opencode.jsonc for unified configuration --- .opencode/opencode.json | 4 ---- opencode.jsonc | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 .opencode/opencode.json diff --git a/.opencode/opencode.json b/.opencode/opencode.json deleted file mode 100644 index 9cc8361..0000000 --- a/.opencode/opencode.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://opencode.ai/config.json", - "lsp": true -} diff --git a/opencode.jsonc b/opencode.jsonc index 4ad38f3..5fc211d 100644 --- a/opencode.jsonc +++ b/opencode.jsonc @@ -1,5 +1,6 @@ { "$schema": "https://opencode.ai/config.json", + "lsp": true, "mcp": { "Astro docs": { "type": "remote", From 719c0e50936af5a41fc77575a2b9f0707489fec1 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 14:53:15 +0800 Subject: [PATCH 05/17] docs(AGENTS.md): simplify and update agent instructions - Rewrite with compact, up-to-date project stack (Astro v6, SolidJS v1, Tailwind CSS v4, pnpm v10, Biome v2) - Remove verbose sections and restructure into focused areas: Stack, Commands, Testing, Content Collections, Key Layout, Deployment - Add Node built-in test runner details and new testing commands - Update development workflows and pre-commit hooks - Document content collections (changelogs, wiki) and source layout - Mention bilingual content and OpenCode skills --- AGENTS.md | 207 +++++++++++++++++++++--------------------------------- 1 file changed, 79 insertions(+), 128 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3230378..cacc72b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,130 +1,81 @@ # AGENTS.md -This document provides context, conventions, and instructions for AI agents (and human developers) working on the `animeko-website` repository. - -## 1. Project Overview - -- **Framework:** [Astro](https://astro.build/) (v5.x) -- **UI Framework:** [SolidJS](https://solidjs.com/) (v1.x) -- **Styling:** [Tailwind CSS](https://tailwindcss.com/) (v4.x) using `@tailwindcss/vite`. -- **Linter/Formatter:** [Biome](https://biomejs.dev/) (v2.x). -- **Package Manager:** [pnpm](https://pnpm.io/) (v10.x). -- **Language:** TypeScript (Strict mode enabled). - -## 2. Development & Build Commands - -Always use `pnpm` for script execution. - -### Core Commands -- **Start Development Server:** - ```bash - pnpm dev - # or - pnpm start - ``` - Runs `astro dev`. - -- **Build Production Artifacts:** - ```bash - pnpm build - ``` - Runs `astro check` (type checking) followed by `astro build`. - *Note: Always run this before submitting changes to ensure type safety.* - -- **Preview Production Build:** - ```bash - pnpm preview - ``` - -### Linting & Formatting -The project uses **Biome** for both linting and formatting. Do not use Prettier or ESLint commands. - -- **Lint and Fix Code:** - ```bash - pnpm code:lint - ``` - Executes `biome lint . --fix`. - -- **Type Checking:** - ```bash - pnpm astro check - ``` - Checks `.astro` files and TypeScript validity. - -### Testing -There is currently no dedicated unit test runner (like Vitest) configured in `package.json`. -**Verification Strategy for Agents:** -1. **Static Analysis:** Run `pnpm code:lint` to catch syntax and style errors. -2. **Type Safety:** Run `pnpm build` (which includes `astro check`) to verify type integrity. -3. **Runtime Verification:** If making UI changes, ensure the dev server starts without errors via `pnpm dev`. - -## 3. Code Style & Conventions - -Strictly adhere to the rules defined in `biome.json`. - -### Formatting Rules -- **Indentation:** 2 spaces. -- **Line Width:** 120 characters. -- **Line Endings:** LF. -- **Quotes:** Double quotes (`"`) for both JS/TS and JSX/Astro attributes. -- **Semicolons:** Always include semicolons. -- **Trailing Commas:** ES5 compatible (objects, arrays, etc.). -- **Arrow Parentheses:** Always included (e.g., `(arg) => ...`). -- **Bracket Spacing:** `true` (e.g., `{ foo }`). - -### Naming Conventions -- **Components:** PascalCase (e.g., `MyComponent.vue`, `Header.astro`). -- **Files/Directories:** Kebab-case is generally preferred for pages and assets, though component files usually match the component name. -- **Variables/Functions:** camelCase. -- **Constants:** UPPER_CASE or camelCase depending on context. - -### TypeScript -- **Strict Mode:** Enabled via `astro/tsconfigs/strict`. -- **No `any`:** Avoid `any` types. Use proper interfaces or `unknown` if necessary. -- **Non-null Assertions:** Biome rule `noNonNullAssertion` is disabled ("off"), but use them sparingly. -- **Unused Variables:** specific Biome rules (`noUnusedVariables`) are set to "warn" or "error". Clean up unused code. - -### CSS / Tailwind -- **Tailwind v4:** This project uses Tailwind CSS v4. -- **Directives:** `@apply`, `@theme`, and other Tailwind directives are supported. -- **Ordering:** Biome handles class sorting/attribute positioning automatically ("auto"). - -### Imports -- **Organization:** Biome `organizeImports` is enabled. -- **Unused Imports:** `noUnusedImports` is set to "warn". Remove them. -- **File Extensions:** Use explicit extensions where appropriate in ESM, though standard bundler resolution applies. - -## 4. Directory Structure - -- `src/pages/`: Astro file-based routing. -- `src/components/`: Reusable UI components (Astro or Vue). -- `src/layouts/`: Astro layouts (e.g., BaseLayout). -- `src/styles/`: Global styles (CSS/Tailwind). -- `src/ui/`: Likely atomic or design-system specific UI components. -- `src/types/`: TypeScript type definitions. -- `public/`: Static assets served at root. - -## 5. Error Handling - -- **Async/Await:** Prefer `async/await` over raw promises. -- **Try/Catch:** Use standard try/catch blocks for API calls or risky operations. -- **Console Logs:** Avoid committing `console.log` statements. Use proper logging if available, or remove debug logs before finalizing. - -## 6. Git & CI Workflow - -- **Pre-commit:** `husky` and `lint-staged` are configured. - - `*.astro`: Runs `astro check`. -- **CI Pipeline:** GitHub Actions (`pr_prew.yml`) runs on Pull Requests. - - Installs dependencies with `pnpm`. - - Runs `pnpm build`. - - Environment: Node.js 23.x. - -## 7. Agent Behavior Guidelines - -- **File Modification:** When editing files, always read the file first to preserve existing structure. -- **Dependencies:** Do NOT add new dependencies without explicit instruction. Use existing packages (`@headlessui/vue`, `@iconify/vue`, etc.). -- **Astro Components:** Keep frontmatter (JavaScript fence `---`) clean and typed. -- **Safety:** Do not bypass `lint-staged` hooks. Ensure your code passes `pnpm code:lint` and `pnpm build` before marking a task as complete. - ---- -*Generated for AI Agents interacting with the animeko-website repository.* +Compact instructions for AI agents working on `animeko-website` (https://myani.org). + +## Stack + +- **Framework:** Astro v6 (static output, deployed to Cloudflare Pages via `wrangler.jsonc`) +- **UI:** SolidJS v1 (JSX in `.tsx` files) +- **Styling:** Tailwind CSS v4 via `@tailwindcss/vite` +- **Lint/Format:** Biome v2 — do NOT use Prettier or ESLint +- **Package Manager:** pnpm v10 (lockfile: `pnpm-lock.yaml`; also has `bun.lock` but use pnpm) +- **Language:** TypeScript strict mode. Path alias `@/*` → `src/*` + +## Commands + +``` +pnpm dev # Dev server +pnpm build # astro check + astro build (run before committing) +pnpm code:fix # biome check --write . (lint + format fix) +pnpm test:logic # node --experimental-strip-types --test src/components/modules/*.test.ts +pnpm astro check # Type-check only (also runs as pre-commit on *.astro via lint-staged) +``` + +Verification order: `pnpm code:fix` → `pnpm build` → if UI changed, `pnpm dev` to spot-check. + +## Testing + +Logic tests use Node's built-in test runner (`node:test` + `node:assert/strict`). Test files live alongside source as `*.test.ts` in `src/components/modules/`. Run with `pnpm test:logic`. + +## Content Collections + +Defined in `src/content.config.ts`: + +- **changelogs** — custom loader fetches release data from an external API at build time. Schema: `version`, `downloadUrlAlternatives`, `publishTime` (unix seconds → ISO date), `description` (rendered as markdown). +- **wiki** — glob loader over `src/content/wiki/*.md`. Frontmatter: `title` (required), `order` (optional), `authors` (optional array). + +## Key Source Layout + +``` +src/ + components/ + common/ # NavBar, Footer, GoogleAnalytics + home/ # Landing page sections (Header, Features, FAQ, etc.) + modules/ # Interactive components (DownloadList.tsx) + logic tests + content/ + wiki/ # Wiki markdown files + config/ # ads.ts + layouts/ # Layout, Doc, Post, Changelog + pages/ # File-based routes (index, downloads, changelogs, wiki/*, about, 404) + plugins/ # rehypeMarkdownImages.ts (custom rehype plugin) + scripts/ # Client-side scripts (analytics, image enhancement) + styles/ # Global CSS +``` + +## Code Style (enforced by biome.json) + +- 2-space indent, 120 char line width, LF line endings, double quotes, semicolons always, ES5 trailing commas +- Arrow parens always, bracket spacing true +- `organizeImports` enabled; remove unused imports +- `noNonNullAssertion` is OFF (allowed but use sparingly) +- Biome rules are relaxed for `.astro`, `.svelte`, `.vue` files (unused vars/imports off) + +## Deployment + +Cloudflare Pages static asset hosting. `wrangler.jsonc` points to `./dist` with auto-trailing-slash HTML handling. CI (`pr_check.yml`) runs on PRs: pnpm install → `pnpm build` with Node 23.x and `--max_old_space_size=8192`. + +## Environment + +Only one env var in `.env.example`: `PUBLIC_GA_MEASUREMENT_ID` (Google Analytics). No other secrets needed for local dev. + +## Pre-commit Hooks + +`husky` + `lint-staged`: runs `astro check` on `*.astro` files and `biome check` on all staged files. Do not bypass or disable. + +## Agent Rules + +- Do NOT add new dependencies without explicit instruction. +- Do NOT commit `console.log` statements. +- Read files before editing to preserve structure. +- Content is bilingual (English + Chinese). See `README_CN.md` and `CONTRIBUTING_CN.md`. +- The project has OpenCode skills in `.opencode/skills/` for UI baseline, accessibility, metadata, and motion performance — load relevant skills when those topics apply. From 2790824c8a9848e08ea0977db2c469be9a12ca65 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 14:56:06 +0800 Subject: [PATCH 06/17] docs(contributing): add stack, commands, pre-commit hooks - add technology stack section - restructure project structure to tree format - document available commands and testing - detail pre-commit hooks and lint-staged usage - update code quality verification steps --- CONTRIBUTING.md | 60 ++++++++++++++++++++++++++++++++++++++-------- CONTRIBUTING_CN.md | 60 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 100 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1086027..983d3b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,15 +2,33 @@ This guide describes how to contribute to the Animeko website. +## Stack + +- Framework: Astro v6 (static output, deployed to Cloudflare Pages) +- UI: SolidJS v1 (JSX in `.tsx` files) +- Styling: Tailwind CSS v4 via `@tailwindcss/vite` +- Lint/Format: Biome v2 — do NOT use Prettier or ESLint +- Package Manager: pnpm v10 +- Language: TypeScript strict mode. Path alias `@/*` → `src/*` + ## Project Structure -- `src/pages/`: File-based routing for Astro pages. -- `src/components/`: Reusable UI components (Astro or Solid). -- `src/layouts/`: Shared page layouts. -- `src/styles/`: Global styles and Tailwind layers. -- `src/ui/`: Design-system style UI building blocks. -- `src/types/`: Shared TypeScript types. -- `public/`: Static assets served at site root. +``` +src/ + components/ + common/ # NavBar, Footer, GoogleAnalytics + home/ # Landing page sections (Header, Features, FAQ, etc.) + modules/ # Interactive components (DownloadList.tsx) + logic tests + content/ + wiki/ # Wiki markdown files + config/ # ads.ts + layouts/ # Layout, Doc, Post, Changelog + pages/ # File-based routes (index, downloads, changelogs, wiki/*, about, 404) + plugins/ # rehypeMarkdownImages.ts (custom rehype plugin) + scripts/ # Client-side scripts (analytics, image enhancement) + styles/ # Global CSS +public/ # Static assets served at site root +``` ## Development Environment @@ -33,25 +51,47 @@ pnpm dev The site runs at `http://localhost:4321` by default. Use `pnpm start` as an alias for `pnpm dev`. +## Available Commands + +``` +pnpm dev # Dev server +pnpm build # astro check + astro build (run before committing) +pnpm code:fix # biome check --write . (lint + format fix) +pnpm test:logic # node --experimental-strip-types --test src/components/modules/*.test.ts +pnpm astro check # Type-check only (also runs as pre-commit on *.astro via lint-staged) +``` + ## Code Standards - Use TypeScript (strict mode is enabled). -- Follow Biome formatting and linting rules in `biome.json`. +- Follow Biome formatting and linting rules in `biome.json` (2-space indent, 120 char line width, double quotes, semicolons, ES5 trailing commas). - Use Tailwind CSS v4 for styling. - Keep imports organized and remove unused code. +## Testing + +Logic tests use Node's built-in test runner (`node:test` + `node:assert/strict`). Test files live alongside source as `*.test.ts` in `src/components/modules/`. Run with `pnpm test:logic`. + ## Commit Standards - Use concise, descriptive commit messages. - Gitmoji is recommended: +## Pre-commit Hooks + +`husky` + `lint-staged` run automatically on commit: +- `astro check` on `*.astro` files +- `biome check` on all staged files + +Do not bypass or disable these hooks. + ## Code Quality Requirements -Run these before submitting: +Verification order before submitting: ```bash pnpm code:fix pnpm build ``` -`pnpm build` includes type checking via `astro check`. +If you changed UI, also run `pnpm dev` to spot-check. `pnpm build` includes type checking via `astro check`. diff --git a/CONTRIBUTING_CN.md b/CONTRIBUTING_CN.md index 7847bb7..a795e2f 100644 --- a/CONTRIBUTING_CN.md +++ b/CONTRIBUTING_CN.md @@ -2,15 +2,33 @@ 本指南用于说明如何为 Animeko 网站做贡献。 +## 技术栈 + +- 框架:Astro v6(静态输出,部署到 Cloudflare Pages) +- UI:SolidJS v1(JSX 写在 `.tsx` 文件中) +- 样式:Tailwind CSS v4,通过 `@tailwindcss/vite` 集成 +- Lint/格式化:Biome v2 — 请勿使用 Prettier 或 ESLint +- 包管理器:pnpm v10 +- 语言:TypeScript 严格模式。路径别名 `@/*` → `src/*` + ## 项目结构 -- `src/pages/`: Astro 页面路由目录。 -- `src/components/`: 可复用 UI 组件(Astro 或 Solid)。 -- `src/layouts/`: 页面布局。 -- `src/styles/`: 全局样式与 Tailwind 层。 -- `src/ui/`: 设计系统风格的基础组件。 -- `src/types/`: 共享 TypeScript 类型。 -- `public/`: 站点根目录静态资源。 +``` +src/ + components/ + common/ # NavBar、Footer、GoogleAnalytics + home/ # 落地页各区块(Header、Features、FAQ 等) + modules/ # 交互组件(DownloadList.tsx)+ 逻辑测试 + content/ + wiki/ # Wiki Markdown 文件 + config/ # ads.ts + layouts/ # Layout、Doc、Post、Changelog + pages/ # 基于文件的路由(index、downloads、changelogs、wiki/*、about、404) + plugins/ # rehypeMarkdownImages.ts(自定义 rehype 插件) + scripts/ # 客户端脚本(统计、图片增强) + styles/ # 全局 CSS +public/ # 站点根目录静态资源 +``` ## 开发环境要求 @@ -33,25 +51,47 @@ pnpm dev 默认访问地址为 `http://localhost:4321`。`pnpm start` 作为 `pnpm dev` 的别名。 +## 可用命令 + +``` +pnpm dev # 开发服务器 +pnpm build # astro check + astro build(提交前执行) +pnpm code:fix # biome check --write .(lint + 格式化修复) +pnpm test:logic # node --experimental-strip-types --test src/components/modules/*.test.ts +pnpm astro check # 仅类型检查(也会在 pre-commit 阶段对 *.astro 文件运行) +``` + ## 代码规范 - 使用 TypeScript(严格模式已开启)。 -- 遵循 `biome.json` 中的格式化与 lint 规则。 +- 遵循 `biome.json` 中的格式化与 lint 规则(2 空格缩进、120 字符行宽、双引号、分号、ES5 尾逗号)。 - 样式使用 Tailwind CSS v4。 - 保持 import 有序,移除未使用代码。 +## 测试 + +逻辑测试使用 Node 内置测试运行器(`node:test` + `node:assert/strict`)。测试文件以 `*.test.ts` 的形式放在 `src/components/modules/` 源码旁边。使用 `pnpm test:logic` 运行。 + ## 提交规范 - 提交信息简洁清晰。 - 推荐使用 Gitmoji: +## Pre-commit 钩子 + +`husky` + `lint-staged` 会在提交时自动运行: +- 对 `*.astro` 文件运行 `astro check` +- 对所有暂存文件运行 `biome check` + +请勿绕过或禁用这些钩子。 + ## 代码质量要求 -提交前请执行: +提交前请按以下顺序验证: ```bash pnpm code:fix pnpm build ``` -`pnpm build` 会包含 `astro check` 的类型检查。 +如果修改了 UI,请额外执行 `pnpm dev` 进行预览检查。`pnpm build` 会包含 `astro check` 的类型检查。 From e54cf00e8fd0a7ac2f015f11f24d617a5ef06257 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:19:53 +0800 Subject: [PATCH 07/17] feat(home): replace inline ad groups with slide panel - Introduce AdSlidePanel component with slide-up animation - Move desktop and mobile ads from header to bottom slide panel - Add ad exposure and slide open event tracking --- src/components/home/AdSlidePanel.astro | 168 +++++++++++++++++++++++++ src/components/home/Header.astro | 6 +- 2 files changed, 171 insertions(+), 3 deletions(-) create mode 100644 src/components/home/AdSlidePanel.astro diff --git a/src/components/home/AdSlidePanel.astro b/src/components/home/AdSlidePanel.astro new file mode 100644 index 0000000..cbeca6f --- /dev/null +++ b/src/components/home/AdSlidePanel.astro @@ -0,0 +1,168 @@ +--- +import { homeAdConfig } from "@/config/ads"; +import AdBanner from "./AdBanner.astro"; + +const landscapeColumns = homeAdConfig.ads.map((ad) => `${ad.width / ad.height}fr`).join(" "); +--- + +
+
+ + +
+
+ { + homeAdConfig.ads.map((ad) => ( + + )) + } +
+
+
+
+ + + + diff --git a/src/components/home/Header.astro b/src/components/home/Header.astro index 69776da..3e44403 100644 --- a/src/components/home/Header.astro +++ b/src/components/home/Header.astro @@ -1,6 +1,6 @@ --- +import AdSlidePanel from "./AdSlidePanel.astro"; import HeaderShowCase from "./HeaderShowCase.astro"; -import HomeAdGroup from "./HomeAdGroup.astro"; --- diff --git a/src/components/home/HomeAdGroup.astro b/src/components/home/HomeAdGroup.astro deleted file mode 100644 index 084325d..0000000 --- a/src/components/home/HomeAdGroup.astro +++ /dev/null @@ -1,46 +0,0 @@ ---- -import { homeAdConfig } from "@/config/ads"; -import AdBanner from "./AdBanner.astro"; - -interface Props { - class?: string; - placement?: string; -} - -const { class: className = "", placement = "home_header" } = Astro.props; -const landscapeColumns = homeAdConfig.ads.map((ad) => `${ad.width / ad.height}fr`).join(" "); ---- - -
- { - homeAdConfig.ads.map((ad) => ( - - )) - } -
- - From c9e589dbb9bd73a1b98dd0127f0aa05990e40e94 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:36:08 +0800 Subject: [PATCH 11/17] refactor(features): remove automatic scroll to FAQ section - remove wheel event listener and smooth scroll behavior - simplify user interaction and reduce unnecessary javascript --- src/components/home/Features.astro | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/components/home/Features.astro b/src/components/home/Features.astro index 117c8a1..055db47 100644 --- a/src/components/home/Features.astro +++ b/src/components/home/Features.astro @@ -2,33 +2,6 @@ import FeatureCard from "./FeatureCard.astro"; --- - -
From 98b662d16e33a7d79e08556a7a16194bf3c9b550 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:36:27 +0800 Subject: [PATCH 12/17] style(faq): increase bottom padding for better spacing - add pb-32 class to FAQ section bottom padding - improve visual separation from subsequent content --- src/components/home/FAQ.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/home/FAQ.astro b/src/components/home/FAQ.astro index 0bd0647..b0a291c 100644 --- a/src/components/home/FAQ.astro +++ b/src/components/home/FAQ.astro @@ -6,7 +6,7 @@ interface Props { const { isIndex } = Astro.props; --- -
+

{isIndex ? 常见问题 : "常见问题"} From 164f23f474e46c8b9b0730caa11906027d6d89a7 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:44:07 +0800 Subject: [PATCH 13/17] chore(config): rename config files to .mts - Rename astro.config.mjs and tailwind.config.mjs to .mts for TypeScript module support --- astro.config.mjs => astro.config.mts | 0 tailwind.config.mjs => tailwind.config.mts | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename astro.config.mjs => astro.config.mts (100%) rename tailwind.config.mjs => tailwind.config.mts (100%) diff --git a/astro.config.mjs b/astro.config.mts similarity index 100% rename from astro.config.mjs rename to astro.config.mts diff --git a/tailwind.config.mjs b/tailwind.config.mts similarity index 100% rename from tailwind.config.mjs rename to tailwind.config.mts From cc4b32b20445a651ee29382601cc89ce6f63c866 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:44:38 +0800 Subject: [PATCH 14/17] fix(plugin): fix tree parameter type in markdown images plugin - change tree parameter from HastNode to unknown to prevent incorrect type inference - add explicit type assertion when visiting elements for safe property access --- src/plugins/rehypeMarkdownImages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/rehypeMarkdownImages.ts b/src/plugins/rehypeMarkdownImages.ts index 71a3edd..cefb2d5 100644 --- a/src/plugins/rehypeMarkdownImages.ts +++ b/src/plugins/rehypeMarkdownImages.ts @@ -155,8 +155,8 @@ function visitElements( * receive `loading`, `decoding`, and dimension attributes. */ export default function rehypeMarkdownImages() { - return (tree: HastNode) => { - visitElements(tree, (node) => { + return (tree: unknown) => { + visitElements(tree as HastNode, (node) => { if (node.tagName !== "img") return; const props = node.properties ?? {}; From fdb2a91e96d30d5273a5a9543f8c6279f691181b Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:48:33 +0800 Subject: [PATCH 15/17] ci(pr-check): update action versions and use Node.js LTS - Bump actions/checkout to v7 - Bump pnpm/action-setup to v6 - Switch node-version to LTS --- .github/workflows/pr_check.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 1724f20..9331182 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -8,19 +8,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@v3 + uses: pnpm/action-setup@v6 with: run_install: true + version: - name: Setup Nodejs uses: actions/setup-node@v4 with: - node-version: 23.1.0 + node-version: lts cache: pnpm - name: Install Deps From 81b5dea22cd35384bf1178d21cb46d1c1c1f97ee Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:49:44 +0800 Subject: [PATCH 16/17] ci(workflow): use explicit latest pnpm version - set version field to 'latest' for clarity and consistency --- .github/workflows/pr_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 9331182..600cbb4 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -16,7 +16,7 @@ jobs: uses: pnpm/action-setup@v6 with: run_install: true - version: + version: latest - name: Setup Nodejs uses: actions/setup-node@v4 From 2a9f8f0541fc7e362331780cbce4425494b57ea7 Mon Sep 17 00:00:00 2001 From: ChouChiu Date: Sat, 20 Jun 2026 15:50:37 +0800 Subject: [PATCH 17/17] ci(workflow): pin Node.js version to 24 - change from lts to 24 to ensure consistent builds and avoid unexpected breakage from Node.js version changes --- .github/workflows/pr_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index 600cbb4..133c01b 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Nodejs uses: actions/setup-node@v4 with: - node-version: lts + node-version: 24 cache: pnpm - name: Install Deps