mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
Add Page properties macro
This commit is contained in:
parent
28ee195a77
commit
0988a7aba1
@ -432,6 +432,9 @@ By default, mark provides several built-in templates and macros:
|
|||||||
- CQL: The CQL query to discover the pages
|
- CQL: The CQL query to discover the pages
|
||||||
- SortBy: Sort by a specific column heading
|
- SortBy: Sort by a specific column heading
|
||||||
|
|
||||||
|
* template: `ac:details` to create page properties
|
||||||
|
- Body: Must contain a table with two rows, the table headings are used as property key. The table content is the value.
|
||||||
|
|
||||||
* macro `@{...}` to mention user by name specified in the braces.
|
* macro `@{...}` to mention user by name specified in the braces.
|
||||||
|
|
||||||
## Template & Macros Usecases
|
## Template & Macros Usecases
|
||||||
|
@ -357,6 +357,14 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* https://confluence.atlassian.com/conf59/page-properties-macro-792499154.html */
|
||||||
|
|
||||||
|
`ac:details`: text(
|
||||||
|
`<ac:structured-macro ac:name="details" ac:schema-version="1"">`,
|
||||||
|
`<ac:rich-text-body>{{ .Body }}</ac:rich-text-body>`,
|
||||||
|
`</ac:structured-macro>`,
|
||||||
|
),
|
||||||
|
|
||||||
// TODO(seletskiy): more templates here
|
// TODO(seletskiy): more templates here
|
||||||
} {
|
} {
|
||||||
templates, err = templates.New(name).Parse(body)
|
templates, err = templates.New(name).Parse(body)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user