diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..775e276 --- /dev/null +++ b/README.en.md @@ -0,0 +1,62 @@ +# STARSET Mirror Project Homepage + +Visit: [https://mirror.starset.fans](https://mirror.starset.fans) + +## Environment Requirements + +- Node.js (recommended v18+) +- pnpm (pnpm is recommended as the package manager) + +## Quick Start + +1. Clone the repository: + ```bash + git clone https://git.owu.one/starset-mirror/homepage + cd homepage + ``` + +2. Install dependencies: + ```bash + pnpm install + ``` + +3. Start the development server: + ```bash + pnpm dev + ``` + +4. Build for production: + ```bash + pnpm build + ``` + +## Project Structure + +``` +homepage +├── data/ # Content files +│ ├── zh-CN/ # Simplified Chinese data +│ ├── zh-TW/ # Traditional Chinese data +│ └── en-US/ # English data +├── src/ # Source code +├── public/ # Static assets +├── docs/ # Documentation +└── scripts/ # Build and tool scripts +``` + +## Contribution Guide + +See [CONTRIBUTING.md](docs/zh-CN/CONTRIBUTING.md) in the `docs` directory to learn how to participate in the project. + +## License + +All content and documentation of this project (`/data` and `/docs`) are under the CC BY-NC-SA 4.0 license. + +The source code of this project is under the AGPL 3.0 license. + +## Contact Us + +If you have any questions or suggestions, feel free to contact us via: + +- Submitting an Issue +- [https://mirror.starset.fans/about](https://mirror.starset.fans/about) diff --git a/README.md b/README.md new file mode 100644 index 0000000..c20b6c9 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# STARSET Mirror 项目主页 + +直接访问: https://mirror.starset.fans + +## 环境要求 + +- Node.js (推荐 v18+) +- pnpm (推荐使用 pnpm 作为包管理器) + +## 快速开始 + +1. 克隆仓库 +```bash +git clone https://git.owu.one/starset-mirror/homepage +cd homepage +``` + +2. 安装依赖 +```bash +pnpm install +``` + +3. 启动开发服务器 +```bash +pnpm dev +``` + +4. 构建生产版本 +```bash +pnpm build +``` + +## 项目结构 + +``` +homepage +├── data/ # 内容文件 +│ ├── zh-CN/ # 简体中文数据 +│ ├── zh-TW/ # 繁体中文数据 +│ └── en-US/ # 英文数据 +├── src/ # 源代码 +├── public/ # 静态资源 +├── docs/ # 文档 +└── scripts/ # 构建和工具脚本 +``` + +## 贡献指南 + +参见 `docs` 目录中的 [CONTRIBUTING.md](docs/zh-CN/CONTRIBUTING.md) 了解如何参与项目。 + +## 许可 + +本项目的所有内容与文档(`/data`与`/docs`)遵循 CC BY-NC-SA 4.0 协议。 + +本项目的源代码遵循 AGPL 3.0 协议。 + +## 联系我们 + +如果你有任何问题或建议,欢迎通过以下方式联系我们: + +- 提交 Issue +- [https://mirror.starset.fans/about](https://mirror.starset.fans/about) diff --git a/README.zh-Hant.md b/README.zh-Hant.md new file mode 100644 index 0000000..3cd8132 --- /dev/null +++ b/README.zh-Hant.md @@ -0,0 +1,62 @@ +# STARSET Mirror 專案主頁 + +直接訪問: https://mirror.starset.fans + +## 環境要求 + +- Node.js (推薦 v18+) +- pnpm (推薦使用 pnpm 作為包管理器) + +## 快速開始 + +1. 克隆倉庫 +```bash +git clone https://git.owu.one/starset-mirror/homepage +cd homepage +``` + +2. 安裝依賴 +```bash +pnpm install +``` + +3. 啟動開發伺服器 +```bash +pnpm dev +``` + +4. 構建生產版本 +```bash +pnpm build +``` + +## 專案結構 + +``` +homepage +├── data/ # 內容文件 +│ ├── zh-CN/ # 簡體中文資料 +│ ├── zh-TW/ # 繁體中文資料 +│ └── en-US/ # 英文資料 +├── src/ # 原始碼 +├── public/ # 靜態資源 +├── docs/ # 文件 +└── scripts/ # 構建和工具腳本 +``` + +## 貢獻指南 + +參見 `docs` 目錄中的 [CONTRIBUTING.md](docs/zh-CN/CONTRIBUTING.md) 了解如何參與專案。 + +## 許可 + +本專案的所有內容與文件(`/data`與`/docs`)遵循 CC BY-NC-SA 4.0 協議。 + +本專案的原始碼遵循 AGPL 3.0 協議。 + +## 聯繫我們 + +如果你有任何問題或建議,歡迎通過以下方式聯繫我們: + +- 提交 Issue +- [https://mirror.starset.fans/about](https://mirror.starset.fans/about) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..5c0e54e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,3 @@ +- [简体中文](./zh-CN/) +- [繁體中文](./zh-TW/) +- [English](./en-US/) diff --git a/docs/en-US/CONTRIBUTING.md b/docs/en-US/CONTRIBUTING.md new file mode 100644 index 0000000..f35fc06 --- /dev/null +++ b/docs/en-US/CONTRIBUTING.md @@ -0,0 +1,130 @@ +# Contribution Guide + +## Data Structure + +### 1. Contributor Information (`data/[lang]/contributors.json`) + +```json +{ + "members": [ + { + "name": "Contributor Name", + "role": "Role Description", + "avatar": "Avatar URL", + "links": [ + { + "name": "Link Name", + "url": "Link URL", + "color": "Text Color Class Name", + "icon": "Icon Name" + } + ], + "isCore": true/false // Whether they are a core contributor + } + ] +} +``` + +### 2. Project Update Articles + +Updates are organized by year and stored in corresponding JSON files. + +In `data/[lang]/updates.json`, reference the index of yearly updates: + +```json +{ + "years": [ + "index/2025.json", + "index/2024.json", + "index/2023.json", + "index/2022.json", + "index/2021.json", + "index/2020.json" + ] +} +``` + +`data/[lang]/updates/index/[YYYY].json` includes the update list for that year: + +```json +{ + "updates": [ + { + "id": "journal-2020q3", // Article ID, forming a URL like `https://mirror.starset.fans/updates/journal-2020q3` + "date": "2020-10-07", // Release date + "title": "Q3 2020 Project Update", // Article title + "summary": "This quarter, we evolved from a bilibili account into a goal-driven project. We experienced site migration, independent finance, multiple app updates, and community management adjustments, and dealt with a security attack.", // Article summary + "tags": ["journal"] // Article tags + } + ] +} +``` + +For specific article content, use Markdown format in `/data/[lang]/updates/[YYYY]/[id].md`. Markdown files contain only the body, not titles or tables of contents. + +### 3. Featured Translations (`data/featured-translations.json`) + +```json +{ + "translations": [ + { + "id": "ID", + "en": "Original English", + "zh_CN": "Simplified Chinese Translation", + "zh_TW": "Traditional Chinese Translation" + } + ] +} +``` + +### 4. Site Translations (`data/[lang]/index.json`) + +If your Pull Request involves modifying site components, ensure any used text is separated into the above translation files and add new translations to the appropriate location in these files. + +## How to Contribute + +### Update Contributor Information + +1. Find the `data/[lang]/contributors.json` file. +2. Add or modify contributor information using the schema above. +3. Ensure all provided URLs (avatar, links, etc.) are accessible. +4. Submit a Pull Request. + +### Add/Modify Update Articles + +1. Create or find the corresponding month's JSON file in the `data/[lang]/updates/[year]/` directory. +2. Add or modify article content following the schema above. +3. Article content supports Markdown format and can include: + - Titles (use #) + - Links + - Images + - Lists + - Quotes + - Code blocks +4. Submit a Pull Request. + +### Add/Modify Featured Translations + +1. Edit the `data/featured-translations.json` file. +2. Add or modify translations following the schema above. +3. Ensure translations are provided in all language versions. +4. Submit a Pull Request. + +## Submission Guide + +1. Fork this repository. +2. Create a feature branch (`git checkout -b feature/AmazingFeature`). +3. Commit your changes (`git commit -m 'Add some AmazingFeature'`). +4. Push to the branch (`git push origin feature/AmazingFeature`). +5. Open a Pull Request. + +## Code Style + +- Use 2-space indentation for JSON files and avoid comments. +- Use lowercase for filenames, separating multiple words with hyphens (-). +- Date format: YYYY-MM-DD. + +## Notes + +1. All text content must follow the multilingual format, ensuring translations exist in all language directories (unless the submission is language-specific). +2. Upload images and other media resources to a designated image host; contact project maintainers for specifics. diff --git a/docs/zh-CN/CONTRIBUTING.md b/docs/zh-CN/CONTRIBUTING.md new file mode 100644 index 0000000..be46d13 --- /dev/null +++ b/docs/zh-CN/CONTRIBUTING.md @@ -0,0 +1,130 @@ +# 贡献指南 + +## 数据文件结构 + +### 1. 贡献者信息 (`data/[lang]/contributors.json`) + +```json +{ + "members": [ + { + "name": "贡献者名称", + "role": "身份描述", + "avatar": "头像URL", + "links": [ + { + "name": "链接名称", + "url": "链接地址", + "color": "文本颜色类名", + "icon": "图标名称" + } + ], + "isCore": true/false // 是否为核心贡献者 + } + ] +} +``` + +### 2. 项目动态文章 + +动态文章按年份组织,存放在对应的 JSON 文件中。 + +`data/[lang]/updates.json` 中引用了对应年份的动态文章索引: + +```json +{ + "years": [ + "index/2025.json", + "index/2024.json", + "index/2023.json", + "index/2022.json", + "index/2021.json", + "index/2020.json" + ] +} +``` + +`data/[lang]/updates/index/[YYYY].json` 中包含了对应年份的动态列表: + +```json +{ + "updates": [ + { + "id": "journal-2020q3", // 文章id,会构成形如 `https://mirror.starset.fans/updates/journal-2020q3` 的 URL + "date": "2020-10-07", // 发布日期 + "title": "2020年第三季度项目动态", // 文章标题 + "summary": "在本季度中,我们从一个bilibili账号“发展”成了一个有目标的项目,这期间我们经历了网站迁移、财务账户独立、多个应用更新和社区管理调整,并处理了一次安全攻击。", // 文章摘要 + "tags": ["journal"] // 文章标签 + } + ] +} +``` + +如果有具体的文章内容,需要以 Markdown 格式存放与 `/data/[lang]/updates/[YYYY]/[id].md` 中。Markdown 文件只包含正文,不包含标题和目录。 + +### 3. 特色翻译 (`data/featured-translations.json`) + +```json +{ + "translations": [ + { + "id": 编号, + "en": "英文原文", + "zh_CN": "简体中文翻译", + "zh_TW": "繁体中文翻译" + } + ] +} +``` + +### 4. 站点翻译(`data/[lang]/index.json`) + +如果你的 Pull Request 涉及对站点组件的修改,请确保将使用的文字分离到上述翻译文件中,并在翻译文件的对应位置添加新的翻译。 + +## 如何贡献 + +### 更新贡献者信息 + +1. 找到 `data/[lang]/contributors.json` 文件 +2. 按照上述 schema 格式添加或修改贡献者信息 +3. 确保提供的所有 URL(头像、链接等)是可访问的 +4. 提交 Pull Request + +### 添加/修改更新文章 + +1. 在 `data/[lang]/updates/[year]/` 目录下创建或找到对应月份的 JSON 文件 +2. 按照上述 schema 格式添加或修改文章内容 +3. 文章内容支持 Markdown 格式,可以包含: + - 标题(使用 #) + - 链接 + - 图片 + - 列表 + - 引用 + - 代码块 +4. 提交 Pull Request + +### 添加/修改特色翻译 + +1. 编辑 `data/featured-translations.json` 文件 +2. 按照上述 schema 格式添加或修改翻译内容 +3. 确保提供所有语言版本的翻译 +4. 提交 Pull Request + +## 提交指南 + +1. Fork 本仓库 +2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`) +3. 提交你的更改 (`git commit -m 'Add some AmazingFeature'`) +4. 推送到分支 (`git push origin feature/AmazingFeature`) +5. 开启一个 Pull Request + +## 代码风格 + +- JSON 文件使用 2 空格缩进,不包含注释 +- 文件名使用小写字母,多个单词用连字符(-)连接 +- 日期格式:YYYY-MM-DD + +## 注意事项 + +1. 所有文本内容都需要遵循多语言格式,确保在所有语言目录下都有对应的翻译(除非提交的资源是针对特定语言) +2. 图片和其他媒体资源请上传到指定的图床,具体请联系项目维护者 diff --git a/docs/zh-TW/CONTRIBUTING.md b/docs/zh-TW/CONTRIBUTING.md new file mode 100644 index 0000000..d94a715 --- /dev/null +++ b/docs/zh-TW/CONTRIBUTING.md @@ -0,0 +1,130 @@ +# 貢獻指南 + +## 數據文件結構 + +### 1. 貢獻者信息 (`data/[lang]/contributors.json`) + +```json +{ + "members": [ + { + "name": "貢獻者名稱", + "role": "身份描述", + "avatar": "頭像URL", + "links": [ + { + "name": "鏈接名稱", + "url": "鏈接地址", + "color": "文本顏色類名", + "icon": "圖標名稱" + } + ], + "isCore": true/false // 是否為核心貢獻者 + } + ] +} +``` + +### 2. 項目動態文章 + +動態文章按年份組織,存放在對應的 JSON 文件中。 + +`data/[lang]/updates.json` 中引用了對應年份的動態文章索引: + +```json +{ + "years": [ + "index/2025.json", + "index/2024.json", + "index/2023.json", + "index/2022.json", + "index/2021.json", + "index/2020.json" + ] +} +``` + +`data/[lang]/updates/index/[YYYY].json` 中包含了對應年份的動態列表: + +```json +{ + "updates": [ + { + "id": "journal-2020q3", // 文章id,會構成形如 `https://mirror.starset.fans/updates/journal-2020q3` 的 URL + "date": "2020-10-07", // 發佈日期 + "title": "2020年第三季度項目動態", // 文章標題 + "summary": "在本季度中,我們從一個bilibili賬號“發展”成為一個有目標的項目,這期間我們經歷了網站遷移、財務賬戶獨立、多个應用更新和社區管理調整,並處理了一次安全攻擊。", // 文章摘要 + "tags": ["journal"] // 文章標籤 + } + ] +} +``` + +如果有具體的文章內容,需要以 Markdown 格式存放於 `/data/[lang]/updates/[YYYY]/[id].md` 中。Markdown 文件只包含正文,不包含標題和目錄。 + +### 3. 特色翻譯 (`data/featured-translations.json`) + +```json +{ + "translations": [ + { + "id": 編號, + "en": "英文原文", + "zh_CN": "簡體中文翻譯", + "zh_TW": "繁體中文翻譯" + } + ] +} +``` + +### 4. 網站翻譯(`data/[lang]/index.json`) + +如果你的 Pull Request 涉及對網站組件的修改,請確保將使用的文字分離到上述翻譯文件中,並在翻譯文件的對應位置添加新的翻譯。 + +## 如何貢獻 + +### 更新貢獻者信息 + +1. 找到 `data/[lang]/contributors.json` 文件 +2. 按照上述 schema 格式添加或修改貢獻者信息 +3. 確保提供的所有 URL(頭像、鏈接等)是可訪問的 +4. 提交 Pull Request + +### 添加/修改更新文章 + +1. 在 `data/[lang]/updates/[year]/` 目錄下創建或找到對應月份的 JSON 文件 +2. 按照上述 schema 格式添加或修改文章內容 +3. 文章內容支持 Markdown 格式,可以包含: + - 標題(使用 #) + - 鏈接 + - 圖片 + - 列表 + - 引用 + - 代碼塊 +4. 提交 Pull Request + +### 添加/修改特色翻譯 + +1. 編輯 `data/featured-translations.json` 文件 +2. 按照上述 schema 格式添加或修改翻譯內容 +3. 確保提供所有語言版本的翻譯 +4. 提交 Pull Request + +## 提交指南 + +1. Fork 本倉庫 +2. 創建你的特性分支 (`git checkout -b feature/AmazingFeature`) +3. 提交你的更改 (`git commit -m 'Add some AmazingFeature'`) +4. 推送到分支 (`git push origin feature/AmazingFeature`) +5. 開啟一個 Pull Request + +## 代碼風格 + +- JSON 文件使用 2 空格縮進,不包含註釋 +- 文件名使用小寫字母,多个單詞用連字符(-)連接 +- 日期格式:YYYY-MM-DD + +## 注意事項 + +1. 所有文本內容都需要遵循多語言格式,確保在所有語言目錄下都有對應的翻譯(除非提交的資源是針對特定語言) +2. 圖片和其他媒體資源請上傳到指定的圖床,具體請聯繫項目維護者 \ No newline at end of file