mirror of
				https://github.com/kovetskiy/mark.git
				synced 2025-11-03 05:37:35 +08:00 
			
		
		
		
	bugfix: Force pages to default width. (#175)
This change is to compensate for an API bug in Confluence where newly create pages end up getting a random width of either "fixed" or "full". Fixes #173
This commit is contained in:
		
							parent
							
								
									f95835469c
								
							
						
					
					
						commit
						5ad1a4abe5
					
				@ -552,6 +552,16 @@ func (api *API) UpdatePage(
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		"metadata": map[string]interface{}{
 | 
							"metadata": map[string]interface{}{
 | 
				
			||||||
			"labels": labels,
 | 
								"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).
 | 
				
			||||||
 | 
								"properties": map[string]interface{}{
 | 
				
			||||||
 | 
									"content-appearance-published": map[string]interface{}{
 | 
				
			||||||
 | 
										"value": "default",
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user