mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-01 21:02:33 +00:00
Merge branch 'kovetskiy:master' into master
This commit is contained in:
@@ -555,16 +555,16 @@ func (api *API) UpdatePage(
|
||||
},
|
||||
"metadata": map[string]interface{}{
|
||||
"labels": labels,
|
||||
// The Confluence API randomly sets page width for some reason:
|
||||
// https://community.developer.atlassian.com/t/confluence-rest-api-create-content-at-random-width/57001
|
||||
|
||||
// This is a workaround to compensate for that bug. It forces the page to be created
|
||||
// with the default appearance, which is "fixed" (not full-width).
|
||||
// Fix to set full-width as has changed on Confluence APIs again.
|
||||
// https://jira.atlassian.com/browse/CONFCLOUD-65447
|
||||
//
|
||||
"properties": map[string]interface{}{
|
||||
"content-appearance-published": map[string]interface{}{
|
||||
"value": "default",
|
||||
"value": "full-width",
|
||||
},
|
||||
},
|
||||
// content-appearance-draft should not be set as this is impacted by
|
||||
// the user editor default configurations - which caused the sporadic published widths.
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,21 @@ func templates(api *confluence.API) (*template.Template, error) {
|
||||
`</ac:structured-macro>{{printf "\n"}}`,
|
||||
),
|
||||
|
||||
/* https://confluence.atlassian.com/doc/blog-posts-macro-139470.html */
|
||||
|
||||
`ac:blog-posts`: text(
|
||||
`<ac:structured-macro ac:name="blog-posts">{{printf "\n"}}`,
|
||||
`{{ if .Content }}<ac:parameter ac:name="content">{{ .Content }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Spaces }}<ac:parameter ac:name="spaces">{{ .Spaces }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Author }}<ac:parameter ac:name="author">{{ .Author }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Time }}<ac:parameter ac:name="time">{{ .Time }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Reverse }}<ac:parameter ac:name="reverse">{{ .Reverse }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Sort }}<ac:parameter ac:name="sort">{{ .Sort }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Max }}<ac:parameter ac:name="max">{{ .Max }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`{{ if .Label }}<ac:parameter ac:name="label">{{ .Label }}</ac:parameter>{{printf "\n"}}{{end}}`,
|
||||
`</ac:structured-macro>{{printf "\n"}}`,
|
||||
),
|
||||
|
||||
// TODO(seletskiy): more templates here
|
||||
} {
|
||||
templates, err = templates.New(name).Parse(body)
|
||||
|
||||
Reference in New Issue
Block a user