mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-23 21:32:41 +08:00
Add contentbylabel macro
This commit is contained in:
parent
dbb5237338
commit
3307f329d9
@ -424,6 +424,9 @@ By default, mark provides several built-in templates and macros:
|
||||
* template: `ac:profile` to display a short summary of a given Confluence user's profile.
|
||||
- Name: The username of the Confluence user whose profile summary you wish to show.
|
||||
|
||||
* template: `ac:contentbylabel` to display a list of pages, blog posts or attachments that have particular labels
|
||||
- CQL: The CQL query to discover the content
|
||||
|
||||
* macro `@{...}` to mention user by name specified in the braces.
|
||||
|
||||
## Template & Macros Usecases
|
||||
|
@ -339,6 +339,14 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`{{ end }}`,
|
||||
),
|
||||
|
||||
/* https://confluence.atlassian.com/conf59/content-by-label-macro-792499087.html */
|
||||
|
||||
`ac:contentbylabel`: text(
|
||||
`<ac:structured-macro ac:name="contentbylabel" ac:schema-version="3">`,
|
||||
`<ac:parameter ac:name="cql">{{ .CQL }}</ac:parameter>`,
|
||||
`</ac:structured-macro>`,
|
||||
),
|
||||
|
||||
// TODO(seletskiy): more templates here
|
||||
} {
|
||||
templates, err = templates.New(name).Parse(body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user