diff options
Diffstat (limited to 'data/templates/template.typst')
| -rw-r--r-- | data/templates/template.typst | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/data/templates/template.typst b/data/templates/template.typst index 8672647be..02f15cbfc 100644 --- a/data/templates/template.typst +++ b/data/templates/template.typst @@ -1,3 +1,14 @@ +#let content-to-string(content) = { + if content.has("text") { + content.text + } else if content.has("children") { + content.children.map(to-string).join("") + } else if content.has("body") { + content-to-string(content.body) + } else if content == [ ] { + " " + } +} #let conf( title: none, subtitle: none, @@ -17,7 +28,7 @@ ) = { set document( title: title, - author: authors.map(author => author.name), + author: authors.map(author => content-to-string(author.name)), keywords: keywords, ) set page( |
