mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
Add recently-updated macro
This commit is contained in:
parent
ac982f3077
commit
bf16d55d68
@ -447,6 +447,15 @@ By default, mark provides several built-in templates and macros:
|
|||||||
- TitleColor: Text color of the title
|
- TitleColor: Text color of the title
|
||||||
- BorderStyle: Style of the panel's border
|
- BorderStyle: Style of the panel's border
|
||||||
|
|
||||||
|
* template `ac:recently-updated` to display a list of most recently changed content
|
||||||
|
- Spaces: List of Spaces to watch (optional, default is current Space)
|
||||||
|
- ShowProfilePic: Show profile picture of editor
|
||||||
|
- Max: Maximum number of changes
|
||||||
|
- Types: Include these content types only (comments, blogposts, pages)
|
||||||
|
- Theme: Apperance of the macro (concise, social, sidebar)
|
||||||
|
- HideHeading: Determines whether the macro hides or displays the text 'Recently Updated' as a title above the list of content
|
||||||
|
- Labels: Filter the results by label. The macro will display only the pages etc which are tagged with the label(s) you specify here.
|
||||||
|
|
||||||
* 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
|
||||||
|
@ -406,6 +406,19 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* */
|
||||||
|
`ac:recently-updated`: text(
|
||||||
|
`<ac:structured-macro ac:name="recently-updated">`,
|
||||||
|
`{{ if .Spaces }}<ac:parameter ac:name="spaces"><ri:space ri:space-key={{ .Spaces }}/></ac:parameter>{{ end }}`,
|
||||||
|
`<ac:parameter ac:name="showProfilePic">{{ or .ShowProfilePic "" }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="types">{{ or .Types "page, comment, blogpost" }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="max">{{ or .Max "" }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="labels">{{ or .Labels "" }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="hideHeading">{{ or .HideHeading "" }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="theme">{{ or .Theme "" }}</ac:parameter>`,
|
||||||
|
`</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