Files
markbase/examples/demo_features.md
Warren e3d6b60825 feat: MarkBase initial version
Phase 1 (Infrastructure):
- Docs: README.md, AGENTS.md, CHANGELOG.md
- Tests: 26 tests (modes_test, filetree_api_test)
- Examples: examples/sample.md, sample.json
- CI/CD: .gitea/workflows/test.yml, release.yml
- Runner: configuration scripts and guides

Phase 2 (Quality):
- Code quality: rustfmt/clippy config
- Security: environment variables
- Test coverage: 62 tests (+36)
- Documentation: CONTRIBUTING.md, docs/api.yaml
- Showcase: demo_features.md, developer_quickstart.md

Test coverage: 75%
Test pass rate: 100%
2026-05-16 15:37:37 +08:00

2.4 KiB
Raw Permalink Blame History

MarkBase功能展示範例

一、Markdown渲染功能

1.1標題支援

H1標題

H2標題

H3標題

H4標題

H5標題
H6標題

1.2文字格式

粗體文字 斜體文字 粗體斜體 刪除線

1.3列表功能

無序列表: -項目 1 -項目 2 -子項目 2.1 -子項目 2.2 -項目 3

有序列表: 1.第一項 2.第二項 3.第三項

1.4表格支援

功能 狀態 說明
表格 支援 標準 Markdown表格
Footnote 支援 腳註功能1
Tasklist 支援 待辦事項列表

1.5代碼區塊

fn main() {
    println!("Hello, MarkBase!");
}
def hello():
    print("Hello, MarkBase!")

##二、檔案樹管理功能

2.1 REST API範例

#取得檔案樹
curl http://localhost:11438/api/v2/tree/demo?mode=tree

#建立資料夾節點
curl -X POST http://localhost:11438/api/v2/tree/demo/node \
  -H "Content-Type: application/json" \
  -d '{"label":"Videos", "node_type":"folder"}'

#更新節點別名
curl -X PATCH http://localhost:11438/api/v2/tree/demo/node/<node_id>/alias \
  -H "Content-Type: application/json" \
  -d '{"lang":"zh_tw", "value":"影片"}'

2.2顯示模式

模式 說明 用途
tree 樹狀顯示 層級結構展示
list 列表顯示 簡潔列表展示
grid_sm 小格狀顯示 緊湊格狀展示
grid_lg 大格狀顯示 寬鬆格狀展示

##三、macOS音訊功能

3.1音訊裝置API

#列出所有音訊裝置
curl http://localhost:11438/devices

#取得音量
curl http://localhost:11438/volume

#切換音訊裝置透過command API
curl -X POST http://localhost:11438/command \
  -H "Content-Type: application/json" \
  -d '{"cmd":"test_voice", "val":"zh_TW", "out":"Display Audio"}'

##四、Mermaid圖表支援

graph TD
    A[MarkBase入口] --> B[CLI解析]
    B --> C[Display伺服器]
    B --> D[Render工具]
    C --> E[REST API]
    E --> F[檔案樹管理]
    E --> G[音訊控制]

##五、多語別別名範例

節點 英文 中文 日文
Videos Videos 影片 動画
Movies Movies 電影 映画
Marketing Marketing 行銷 マーケティング

MarkBase展示範例完成


  1. 這是一個腳註範例。 ↩︎