Add Page properties macro

This commit is contained in:
Manuel Rüger 2023-05-24 19:31:08 +02:00
parent 28ee195a77
commit 0988a7aba1
2 changed files with 11 additions and 0 deletions

View File

@ -432,6 +432,9 @@ By default, mark provides several built-in templates and macros:
- CQL: The CQL query to discover the pages
- 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.
## Template & Macros Usecases

View File

@ -357,6 +357,14 @@ func templates(api *confluence.API) (*template.Template, error) {
`</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
} {
templates, err = templates.New(name).Parse(body)