docs: readme

This commit is contained in:
hypercross 2026-03-10 01:47:17 +08:00
parent f736b7309e
commit c3a49711e7
1 changed files with 17 additions and 1 deletions

View File

@ -11,7 +11,7 @@
## CLI 命令
```bash
# 克隆仓库后npm link安装
# 克隆仓库后npm install & npm link安装
# 在项目文件夹内运行
ttrpg serve [dir] -p 3000
@ -35,6 +35,22 @@ ttrpg serve [dir] -p 3000
:table[./sparks.csv]{roll=true remix=true}
```
### 卡牌组件
假设准备有`./cards.csv`内容如下:
```csv
label,title,body
1,卡牌1,这张卡牌的**效果**的markdown文本
2,卡牌2,更多卡牌效果
```
```markdown
:md-deck[./cards.csv]{grid="5x8" layers="title:1,1-5,1f8 body:1,5-5,8f3"}
```
上述卡牌将生成5x8的卡牌牌面排版其中title层占第1行1-5列8mm字体。
## 开发
```bash