-
Notifications
You must be signed in to change notification settings - Fork 3
chore: optimize project metadata and CI/CD #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AIPMAndy
wants to merge
1
commit into
main
Choose a base branch
from
optimize-project-metadata
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| pull_request: | ||
| branches: [ main, develop ] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run type check | ||
| run: npm run lint | ||
|
|
||
| - name: Build project | ||
| run: npm run build | ||
|
|
||
| - name: Upload build artifacts | ||
| if: matrix.node-version == '20.x' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| retention-days: 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Deploy to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v4 | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: ./dist | ||
|
|
||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to MDskill-Web will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - GitHub Actions CI/CD workflows for automated build and deployment | ||
| - CONTRIBUTING.md with contribution guidelines | ||
| - CHANGELOG.md for tracking version history | ||
|
|
||
| ### Changed | ||
| - Updated package.json: renamed project from "articlelayout" to "mdskill-web" | ||
| - Updated CLI.md: renamed references from "PageSkill" to "MDskill" | ||
| - Updated repository URL to correct GitHub location | ||
|
|
||
| ### Fixed | ||
| - Fixed naming inconsistencies across project files | ||
|
|
||
| ## [1.0.0] - 2026-04-25 | ||
|
|
||
| ### Added | ||
| - 3 基础主题: Minimal, Business, Tech | ||
| - 实时 Markdown 预览 | ||
| - 微信公众号内联样式适配 | ||
| - HTML 和 PNG 导出功能 | ||
| - 命令行工具支持批量处理 | ||
| - OpenClaw 集成能力 | ||
|
|
||
| ### Features | ||
| - React 18 + TypeScript + Vite 技术栈 | ||
| - Tailwind CSS 样式系统 | ||
| - marked 库进行 Markdown 解析 | ||
| - html2canvas 实现图片导出 | ||
|
|
||
| ### Documentation | ||
| - 完整的中英文 README | ||
| - CLI 使用文档 | ||
| - 产品截图和使用说明 | ||
|
|
||
| --- | ||
|
|
||
| ## Version History | ||
|
|
||
| - **1.0.0** - Initial release with core features | ||
| - **Unreleased** - Project metadata optimization and CI/CD setup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| # Contributing to MDskill-Web | ||
|
|
||
| 感谢你考虑为 MDskill-Web 做出贡献! | ||
|
|
||
| ## 🚀 快速开始 | ||
|
|
||
| ### 开发环境设置 | ||
|
|
||
| 1. Fork 并克隆仓库 | ||
| ```bash | ||
| git clone https://github.com/YOUR_USERNAME/MDskill-Web.git | ||
| cd MDskill-Web | ||
| ``` | ||
|
|
||
| 2. 安装依赖 | ||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| 3. 启动开发服务器 | ||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| 4. 访问 http://localhost:5173 | ||
|
|
||
| ## 📝 提交规范 | ||
|
|
||
| 我们使用 [Conventional Commits](https://www.conventionalcommits.org/) 规范: | ||
|
|
||
| - `feat:` 新功能 | ||
| - `fix:` Bug 修复 | ||
| - `docs:` 文档更新 | ||
| - `style:` 代码格式(不影响代码运行的变动) | ||
| - `refactor:` 重构(既不是新增功能,也不是修复 bug) | ||
| - `perf:` 性能优化 | ||
| - `test:` 测试相关 | ||
| - `chore:` 构建过程或辅助工具的变动 | ||
|
|
||
| 示例: | ||
| ```bash | ||
| feat: add dark mode support | ||
| fix: correct template rendering issue | ||
| docs: update CLI usage examples | ||
| ``` | ||
|
|
||
| ## 🔄 工作流程 | ||
|
|
||
| 1. 创建新分支 | ||
| ```bash | ||
| git checkout -b feature/your-feature-name | ||
| # 或 | ||
| git checkout -b fix/your-bug-fix | ||
| ``` | ||
|
|
||
| 2. 进行修改并提交 | ||
| ```bash | ||
| git add . | ||
| git commit -m "feat: your feature description" | ||
| ``` | ||
|
|
||
| 3. 推送到你的 fork | ||
| ```bash | ||
| git push origin feature/your-feature-name | ||
| ``` | ||
|
|
||
| 4. 创建 Pull Request | ||
|
|
||
| ## 🎯 代码规范 | ||
|
|
||
| - 使用 TypeScript 编写代码 | ||
| - 遵循项目现有的代码风格 | ||
| - 运行 `npm run lint` 确保代码通过类型检查 | ||
| - 确保 `npm run build` 能成功构建 | ||
|
|
||
| ## 🧪 测试 | ||
|
|
||
| 在提交 PR 之前: | ||
|
|
||
| 1. 确保开发服务器正常运行 | ||
| 2. 测试所有主题的渲染效果 | ||
| 3. 验证导出功能(HTML 和 PNG) | ||
| 4. 检查命令行工具是否正常工作 | ||
|
|
||
| ## 📋 PR 检查清单 | ||
|
|
||
| 提交 PR 前确保: | ||
|
|
||
| - [ ] 代码遵循项目风格 | ||
| - [ ] 通过 TypeScript 类型检查 | ||
| - [ ] 构建成功 | ||
| - [ ] 功能已在本地测试 | ||
| - [ ] 更新了相关文档(如需要) | ||
| - [ ] 提交信息符合规范 | ||
|
|
||
| ## 🎨 添加新主题 | ||
|
|
||
| 如果你想贡献新主题: | ||
|
|
||
| 1. 在 `src/templates/` 目录下创建新主题文件 | ||
| 2. 遵循现有主题的结构 | ||
| 3. 在 `src/templates/index.ts` 中注册主题 | ||
| 4. 更新文档说明新主题的特点和适用场景 | ||
|
|
||
| ## 🐛 报告 Bug | ||
|
|
||
| 提交 Issue 时请包含: | ||
|
|
||
| - 问题描述 | ||
| - 重现步骤 | ||
| - 预期行为 | ||
| - 实际行为 | ||
| - 浏览器/Node.js 版本 | ||
| - 截图(如适用) | ||
|
|
||
| ## 💡 功能建议 | ||
|
|
||
| 我们欢迎新功能建议!请先创建 Issue 讨论: | ||
|
|
||
| - 功能描述 | ||
| - 使用场景 | ||
| - 可能的实现方案 | ||
| - 是否愿意实现该功能 | ||
|
|
||
| ## 📜 许可证 | ||
|
|
||
| 通过提交代码,你同意你的贡献将在 Apache-2.0 许可证下发布。 | ||
|
|
||
| ## 🙏 行为准则 | ||
|
|
||
| - 尊重所有贡献者 | ||
| - 提供建设性的反馈 | ||
| - 关注代码质量和项目目标 | ||
| - 保持友好和专业的沟通 | ||
|
|
||
| ## 📮 联系方式 | ||
|
|
||
| - 微信: AIPMAndy | ||
| - GitHub: [@AIPMAndy](https://github.com/AIPMAndy) | ||
|
|
||
| --- | ||
|
|
||
| 再次感谢你的贡献!🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this workflow deploys
AIPMAndy/MDskill-Webas a GitHub Pages project site, the app is served under/MDskill-Web/, but this build still uses the repo's existing Vite config with nobaseoverride. Vite will emit root-relative URLs such as/assets/...and the existing/favicon.svg, so the deployed page requests assets fromhttps://aipmandy.github.io/assets/...instead of the project path and loads as a blank/broken app unless a custom root domain is configured.Useful? React with 👍 / 👎.