From 28ee195a771daa98a61caaece7e8d1ec0a0c8925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Wed, 24 May 2023 19:23:40 +0200 Subject: [PATCH] Add Page Properties Report macro --- README.md | 5 +++++ pkg/mark/stdlib/stdlib.go | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 1fc6dac..e0037fc 100644 --- a/README.md +++ b/README.md @@ -427,6 +427,11 @@ By default, mark provides several built-in templates and macros: * template: `ac:contentbylabel` to display a list of pages, blog posts or attachments that have particular labels - CQL: The CQL query to discover the content +* template: `ac:detailssummary` to show summary information from one page on a another page + - Headings: Column headings to show + - CQL: The CQL query to discover the pages + - SortBy: Sort by a specific column heading + * 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 4129ee8..c2a43b3 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -347,6 +347,16 @@ func templates(api *confluence.API) (*template.Template, error) { ``, ), + /* https://confluence.atlassian.com/conf59/page-properties-report-macro-792499165.html */ + + `ac:detailssummary`: text( + ``, + `{{ .Headings }}`, + `{{ .SortBy }}`, + `{{ .CQL }}`, + ``, + ), + // TODO(seletskiy): more templates here } { templates, err = templates.New(name).Parse(body)