Add the ability to put an information message at the top of a confluence page
This commit is contained in:
parent
d3f8d19f88
commit
40a59106fd
@ -68,3 +68,21 @@ By default, it will inform you that some pages aren't needed anymore and you can
|
||||
```
|
||||
|
||||
By setting `delete` to `true` (or running `daux.phar` with the `--delete` flag) you tell the generator that it can safely delete the pages.
|
||||
|
||||
|
||||
## Information message
|
||||
When you create your page. there is no indication that the upload process will override the content of the pages.
|
||||
|
||||
It happens sometimes that users edit the pages to add / fix an information.
|
||||
|
||||
You can add a text in a "information" macro on top of the document by setting the following configuration :
|
||||
|
||||
```json
|
||||
{
|
||||
"confluence": { "header": "These pages are updated automatically, your changes will be overriden." }
|
||||
}
|
||||
```
|
||||
|
||||
It will look like this :
|
||||
|
||||
![Info macro](info_macro.png)
|
||||
|
BIN
docs/05_Configuration/info_macro.png
Normal file
BIN
docs/05_Configuration/info_macro.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -27,7 +27,13 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage
|
||||
}
|
||||
);
|
||||
|
||||
return $content;
|
||||
|
||||
$intro = '';
|
||||
if (array_key_exists('confluence', $this->params) && array_key_exists('header', $this->params['confluence']) && !empty($this->params['confluence']['header'])) {
|
||||
$intro = '<ac:structured-macro ac:name="info"><ac:rich-text-body>' . $this->params['confluence']['header'] . '</ac:rich-text-body></ac:structured-macro>';
|
||||
}
|
||||
|
||||
return $intro . $content;
|
||||
}
|
||||
|
||||
private function createImageTag($filename, $attributes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user