From 8b72bc8e20b106775ba11cfe988119692eca995d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Wed, 9 Aug 2023 15:38:48 +0200 Subject: [PATCH] Add pagetreesearch macro --- README.md | 3 +++ pkg/mark/stdlib/stdlib.go | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 59256886..c08e0f13 100644 --- a/README.md +++ b/README.md @@ -456,6 +456,9 @@ By default, mark provides several built-in templates and macros: - HideHeading: Determines whether the macro hides or displays the text 'Recently Updated' as a title above the list of content - Labels: Filter the results by label. The macro will display only the pages etc which are tagged with the label(s) you specify here. +* template: `ac:pagetreesearch` to add a search box to your Confluence page. + - Root: Name of the root page whose hierarchy of pages will be searched by this macro. If this not specified, the root page is the current page. + * macro `@{...}` to mention user by name specified in the braces. ## Template & Macros Usecases diff --git a/pkg/mark/stdlib/stdlib.go b/pkg/mark/stdlib/stdlib.go index af9f95c3..74124bcb 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -392,6 +392,14 @@ func templates(api *confluence.API) (*template.Template, error) { ``, ), + /* https://confluence.atlassian.com/conf59/page-tree-search-macro-792499178.html */ + + `ac:pagetreesearch`: text( + ``, + `{{ if .Root }}{{ .Root }}{{ end }}`, + ``, + ), + /* https://confluence.atlassian.com/conf59/panel-macro-792499179.html */ `ac:panel`: text( @@ -406,7 +414,7 @@ func templates(api *confluence.API) (*template.Template, error) { ``, ), - /* */ + /* https://confluence.atlassian.com/conf59/recently-updated-macro-792499187.html */ `ac:recently-updated`: text( ``, `{{ if .Spaces }}{{ end }}`,