feat: add display-documentary parameter

Add `display-documentary` parameter determine if documentary page should
be displayed or not.
This commit is contained in:
2025-11-21 17:26:23 +02:00
parent 54f7a8cef8
commit a05dbee1fb
5 changed files with 24 additions and 20 deletions

View File

@@ -49,6 +49,7 @@
outline-title: "Saturs",
attachments: (),
attachment-title: "Pielikumi",
display-documentary: true,
body,
) = {
// Set document metadata.
@@ -283,21 +284,23 @@
make-attachments(attachment-title, attachments)
make-documentary-page(
if type(title) == content {
title
.fields()
.values()
.at(0)
.filter(it => it.func() != linebreak and it != [ ])
.join(" ")
} else {
title
},
authors,
advisors,
reviewer,
thesis-type,
date,
)
if display-documentary {
make-documentary-page(
if type(title) == content {
title
.fields()
.values()
.at(0)
.filter(it => it.func() != linebreak and it != [ ])
.join(" ")
} else {
title
},
authors,
advisors,
reviewer,
thesis-type,
date,
)
}
}