Skip to content

Commit 72c01a2

Browse files
fu050409ztygod
andauthored
feat(docs): add docs site (#41)
Fork of #39, all documents and related scripts were temporarily deleted, and environmental issues were fixed to ensure that the merging codes are clean. --------- Co-authored-by: TianYi <[email protected]>
1 parent 3fb7da3 commit 72c01a2

20 files changed

+3795
-100
lines changed

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"matechat",
99
"nanoevents",
1010
"rolldown",
11+
"rspress",
1112
"tsdown",
1213
"unbundle"
1314
]

.github/workflows/docs-deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
# Build job
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- uses: pnpm/action-setup@v4
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: pnpm
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
35+
- name: Install dependencies
36+
run: pnpm install
37+
- name: Build with Rspress
38+
run: |
39+
pnpm docs:build
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: docs/doc_build
44+
45+
# Deployment job
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
needs: build
51+
runs-on: ubuntu-latest
52+
name: Deploy
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

docs/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Local
2+
.DS_Store
3+
*.local
4+
*.log*
5+
6+
# Dist
7+
node_modules
8+
dist/
9+
doc_build/
10+
11+
# IDE
12+
.vscode/*
13+
!.vscode/extensions.json
14+
.idea

docs/docs/en/_meta.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"text": "Releases",
4+
"items": [
5+
{
6+
"text": "Release Notes",
7+
"link": "https://github.com/DevCloudFE/matechat-react/releases"
8+
}
9+
]
10+
}
11+
]

docs/docs/en/index.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
pageType: home
3+
4+
hero:
5+
name: MateChat React
6+
text: AI scenario solution
7+
tagline: A frontend AI scenario solution UI library based on DevUI Design
8+
# actions:
9+
# - theme: brand
10+
# text: Quick Start
11+
# link: /guide/start/introduction
12+
# - theme: alt
13+
# text: GitHub
14+
# link: https://github.com/DevCloudFE/matechat-react
15+
image:
16+
src: /matechat-icon.svg
17+
18+
features:
19+
- title: Rich AI Conversation Components
20+
details: Provides modular components required for building chat UIs, such as bubbles, avatars, lists, input boxes, etc., all supporting property settings.
21+
icon: 💬
22+
23+
- title: Optimized for AI Scenarios
24+
details: Supports multi - turn conversations and streaming message display, suitable for scenarios such as AI assistants, intelligent robots, and Agents.
25+
icon: 🤖
26+
27+
- title: React Port of MateChat Vue
28+
details: A complete port of the MateChat library, written in idiomatic TSX and TypeScript to ensure a consistent experience across different technology stacks.
29+
icon: 🔁
30+
31+
- title: Lightweight, Flexible, and Theme - Customizable
32+
details: Natively supports theme extension and can be easily integrated into any design system without additional overhead.
33+
icon: 🎨
34+
35+
- title: Ready - to - Use Message Rendering Capability
36+
details: Built - in support for rendering various message types such as text, code, and system prompts with a clear structure.
37+
icon: 🧩
38+
39+
- title: Production - Ready
40+
details: Well - tested and can be seamlessly integrated into mainstream React applications such as Next.js and Vite.
41+
icon: 🚀
42+
---

docs/docs/public/matechat-icon.svg

Lines changed: 69 additions & 0 deletions
Loading

docs/docs/tailwind.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import "tailwindcss";
2+
3+
@custom-variant dark (&:where(.dark, .dark *));

docs/docs/zh/_meta.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"text": "版本",
4+
"items": [
5+
{
6+
"text": "更新日志",
7+
"link": "https://github.com/DevCloudFE/matechat-react/releases"
8+
}
9+
]
10+
}
11+
]

docs/docs/zh/index.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
pageType: home
3+
4+
hero:
5+
name: MateChat React
6+
text: AI 场景解决方案
7+
tagline: 基于 DevUI Design 的 AI 场景前端解决方案
8+
# actions:
9+
# - theme: brand
10+
# text: 快速开始
11+
# link: guide/start/introduction
12+
# - theme: alt
13+
# text: GitHub
14+
# link: https://github.com/DevCloudFE/matechat-react
15+
image:
16+
src: /matechat-icon.svg
17+
18+
features:
19+
- title: 丰富的 AI 对话组件
20+
details: 提供构建聊天 UI 所需的模块化组件,如气泡、头像、列表、输入框等,均支持属性设置。
21+
icon: 💬
22+
23+
- title: 针对 AI 场景优化
24+
details: 支持多轮对话、消息流式展示,适用于 AI 助手、智能机器人、Agent 等场景。
25+
icon: 🤖
26+
27+
- title: MateChat Vue 的 React 移植版
28+
details: 完整移植 MateChat库,采用地道的 TSX 与 TypeScript 编写,确保在不同技术栈中一致体验。
29+
icon: 🔁
30+
31+
- title: 轻量灵活,支持主题定制
32+
details: 天然支持主题扩展,轻松集成到任何设计系统中,避免额外开销。
33+
icon: 🎨
34+
35+
- title: 开箱即用的消息渲染能力
36+
details: 内置支持文本、代码、系统提示等多种消息类型渲染,结构清楚。
37+
icon: 🧩
38+
39+
- title: 面向生产环境准备
40+
details: 经过良好测试,可无缝集成至 Next.js、Vite、等主流 React 应用中。
41+
icon: 🚀
42+
---

docs/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module "*.png";

0 commit comments

Comments
 (0)