Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
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
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yml
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
Comment on lines +32 to +33

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Set the Pages base path before building

When this workflow deploys AIPMAndy/MDskill-Web as a GitHub Pages project site, the app is served under /MDskill-Web/, but this build still uses the repo's existing Vite config with no base override. Vite will emit root-relative URLs such as /assets/... and the existing /favicon.svg, so the deployed page requests assets from https://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 👍 / 👎.


- 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
49 changes: 49 additions & 0 deletions CHANGELOG.md
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
16 changes: 8 additions & 8 deletions CLI.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PageSkill CLI
# MDskill CLI

命令行版本的 PageSkill,支持通过命令行快速将 Markdown 转换为精美排版的 HTML。
命令行版本的 MDskill,支持通过命令行快速将 Markdown 转换为精美排版的 HTML。

## 🚀 快速开始

Expand Down Expand Up @@ -62,21 +62,21 @@ done
### 示例 4:配合 OpenClaw 使用
```bash
# 在 OpenClaw Skill 中调用
node /path/to/PageSkill/cli.js content.md --template modern --output result.html
node /path/to/MDskill/cli.js content.md --template modern --output result.html
```

## 🔧 集成到 OpenClaw

PageSkill CLI 可以无缝集成到 OpenClaw 工作流中
MDskill CLI 可以无缝集成到 OpenClaw 工作流中:

```javascript
// 在 SKILL.md 中调用
exec(`node /path/to/PageSkill/cli.js ${inputFile} --template modern --output ${outputFile}`)
exec(`node /path/to/MDskill/cli.js ${inputFile} --template modern --output ${outputFile}`)
```

## 📦 依赖

CLI 工具依赖 PageSkill 的 npm 包,确保已安装
CLI 工具依赖 MDskill 的 npm 包,确保已安装:

```bash
npm install
Expand Down Expand Up @@ -110,7 +110,7 @@ npm install
## 🔮 未来计划

- [ ] 支持自定义 CSS 模板
- [ ] 支持配置文件(.pageskillrc
- [ ] 支持配置文件(.mdskillrc
- [ ] 支持 PDF 导出
- [ ] 支持图片优化
- [ ] 支持多文件合并
Expand All @@ -121,4 +121,4 @@ Apache-2.0

---

**GitHub**: [AIPMAndy/PageSkill](https://github.com/AIPMAndy/PageSkill)
**GitHub**: [AIPMAndy/MDskill-Web](https://github.com/AIPMAndy/MDskill-Web)
143 changes: 143 additions & 0 deletions CONTRIBUTING.md
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)

---

再次感谢你的贡献!🎉
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# MDskill-Web

[![CI](https://github.com/AIPMAndy/MDskill-Web/actions/workflows/ci.yml/badge.svg)](https://github.com/AIPMAndy/MDskill-Web/actions/workflows/ci.yml)
[![Deploy](https://github.com/AIPMAndy/MDskill-Web/actions/workflows/deploy.yml/badge.svg)](https://github.com/AIPMAndy/MDskill-Web/actions/workflows/deploy.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![GitHub Stars](https://img.shields.io/github/stars/AIPMAndy/MDskill-Web?style=social)](https://github.com/AIPMAndy/MDskill-Web)

> 🌐 **MDskill 品牌的 Web 端** - 精美的 Markdown 在线排版工具

**MDskill 产品矩阵:**
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "articlelayout",
"name": "mdskill-web",
"version": "1.0.0",
"description": "文章排版神器 - 一键生成精美排版",
"description": "MDskill-Web - 精美的 Markdown 在线排版工具",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,10 +11,11 @@
"lint:eslint": "eslint . --ext ts,tsx"
},
"keywords": [
"wechat",
"layout",
"mdskill",
"markdown",
"typesetting",
"wechat",
"layout",
"公众号",
"排版",
"article",
Expand All @@ -24,7 +25,7 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/AIPMAndy/ArticleLayout.git"
"url": "https://github.com/AIPMAndy/MDskill-Web.git"
},
"devDependencies": {
"@types/dompurify": "^3.0.0",
Expand Down
Loading