Skip to content

Commit a6f6759

Browse files
IllustratedMan-codejmpunkt
authored andcommitted
Makes typst use org date
1 parent cc7e966 commit a6f6759

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ox-typst.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ will result in `ox-typst' to apply the colors to the code block."
574574
(email (when (plist-get info :with-email)
575575
(plist-get info :email)))
576576
(toc (plist-get info :with-toc))
577+
(date (plist-get info :date))
577578
(typst-header (plist-get info :typst-header)))
578579
(concat
579580
(format "#let _ = ```typ
@@ -583,6 +584,7 @@ exec %s
583584
(concat
584585
"#set document("
585586
(format "title: \"%s\"" (or (car title) ""))
587+
(when date (format ", date: %s" (string-trim-right (string-trim-left (org-typst-timestamp (car date) contents info) "#") ".display()")))
586588
(when author
587589
(or (when email
588590
(format ", author: \"<%s> %s\"" (car author) email))

0 commit comments

Comments
 (0)