From 0988a7aba19157666c64d7c3d4fd67c19e63e24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Wed, 24 May 2023 19:31:08 +0200 Subject: [PATCH] Add Page properties macro --- README.md | 3 +++ pkg/mark/stdlib/stdlib.go | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index e0037fc..f5d7191 100644 --- a/README.md +++ b/README.md @@ -432,6 +432,9 @@ By default, mark provides several built-in templates and macros: - CQL: The CQL query to discover the pages - SortBy: Sort by a specific column heading +* template: `ac:details` to create page properties + - Body: Must contain a table with two rows, the table headings are used as property key. The table content is the value. + * 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 c2a43b3..eac434f 100644 --- a/pkg/mark/stdlib/stdlib.go +++ b/pkg/mark/stdlib/stdlib.go @@ -357,6 +357,14 @@ func templates(api *confluence.API) (*template.Template, error) { ``, ), + /* https://confluence.atlassian.com/conf59/page-properties-macro-792499154.html */ + + `ac:details`: text( + ``, + `{{ .Body }}`, + ``, + ), + // TODO(seletskiy): more templates here } { templates, err = templates.New(name).Parse(body)