diff --git a/README.md b/README.md index ae347a36..5ff5893f 100644 --- a/README.md +++ b/README.md @@ -530,8 +530,48 @@ See [Confluence TOC Macro] for the list of parameters - keep in mind that here they start with capital letters. Every skipped field will have the default value, so feel free to include only the ones that you require. - [Confluence TOC Macro]:https://confluence.atlassian.com/conf59/table-of-contents-macro-792499210.html + +### Insert PageTree + +```markdown +# My First Heading + +``` + +The pagetree macro works almost the same as the TOC above, but the tree behavior +is more desirable for creating placeholder pages above collections of SOPs. + +The default pagetree macro behavior is to insert a tree rooted @self. + +The following parameters can be used to alter your default configuration with +parameters described more in depth here:[Confluence Pagetree Macro]. + +Parameters: + +* Title (of tree root page) +* Sort +* Excerpt +* Reverse +* SearchBox +* ExpandCollapseAll +* StartDepth + +[Confluence Pagetree Macro]:https://confluence.atlassian.com/conf59/page-tree-macro-792499177.html + +E.G. +```markdown + + +# My First Heading + +:pagetree: +``` + ### Insert Children Display To include Children Display (TOC displaying children pages) use following macro: diff --git a/pkg/mark/stdlib/stdlib.go b/pkg/mark/stdlib/stdlib.go index 4abbaf9c..b952da66 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -374,6 +374,24 @@ func templates(api *confluence.API) (*template.Template, error) { ``, ), + /* https://confluence.atlassian.com/conf59/page-tree-macro-792499177.html */ + + `ac:pagetree`: text( + ``, + ``, + ``, + ``, + ``, + ``, + `{{ or .Sort "" }}`, + `{{ or .Excerpt "" }}`, + `{{ or .Reverse "" }}`, + `{{ or .SearchBox "" }}`, + `{{ or .ExpandCollapseAll "" }}`, + `{{ or .StartDepth "" }}`, + ``, + ), + // TODO(seletskiy): more templates here } { templates, err = templates.New(name).Parse(body)