Add Content-Appearance header

Allows switching between the "full-width" and "fixed" page layouts.

The "fixed" layout renders the page in a narrow column. (Confluence
default)

If not configured, it defaults to "full-width".
This commit is contained in:
Bernd Ahlers
2023-03-06 10:09:28 +01:00
parent 4b5e9c23ec
commit 9e656ece15
4 changed files with 43 additions and 23 deletions

View File

@@ -514,9 +514,7 @@ func (api *API) CreatePage(
return request.Response.(*PageInfo), nil
}
func (api *API) UpdatePage(
page *PageInfo, newContent string, minorEdit bool, newLabels []string,
) error {
func (api *API) UpdatePage(page *PageInfo, newContent string, minorEdit bool, newLabels []string, appearance string) error {
nextPageVersion := page.Version.Number + 1
oldAncestors := []map[string]interface{}{}
@@ -560,7 +558,7 @@ func (api *API) UpdatePage(
//
"properties": map[string]interface{}{
"content-appearance-published": map[string]interface{}{
"value": "full-width",
"value": appearance,
},
},
// content-appearance-draft should not be set as this is impacted by