mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 21:18:07 +01:00
🎨 提供 Sprig 模板渲染 API Fix https://github.com/siyuan-note/siyuan/issues/7767
This commit is contained in:
parent
986166ff8b
commit
13d88644a8
4 changed files with 64 additions and 0 deletions
22
API.md
22
API.md
|
|
@ -35,6 +35,7 @@
|
|||
* [Execute SQL query](#Execute-SQL-query)
|
||||
* [Templates](#Templates)
|
||||
* [Render a template](#Render-a-template)
|
||||
* [Render Sprig](#Render-Sprig)
|
||||
* [File](#File)
|
||||
* [Get file](#Get-file)
|
||||
* [Put file](#Put-file)
|
||||
|
|
@ -831,6 +832,27 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
|
|||
}
|
||||
```
|
||||
|
||||
### 渲染 Sprig
|
||||
|
||||
* `/api/template/renderSprig`
|
||||
* Parameters
|
||||
|
||||
```json
|
||||
{
|
||||
"template": "/daily note/{{now | date \"2006/01\"}}/{{now | date \"2006-01-02\"}}"
|
||||
}
|
||||
```
|
||||
* `template`: template content
|
||||
* Return value
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": "/daily note/2023/03/2023-03-24"
|
||||
}
|
||||
```
|
||||
|
||||
## File
|
||||
|
||||
### Get file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue