@@ -182,11 +182,13 @@ function render_typst_brand_yaml()
182182 end
183183
184184 local link = _quarto .modules .brand .get_typography (' link' )
185- if link and next (link ) then
185+ local primaryColor = _quarto .modules .brand .get_color (' primary' )
186+ if link and next (link ) or primaryColor then
187+ link = link or {}
186188 quarto .doc .include_text (' in-header' , table.concat ({
187189 ' #show link: set text(' ,
188190 conditional_entry (' weight' , link .weight ),
189- conditional_entry (' fill' , link .color , false ),
191+ conditional_entry (' fill' , link .color or primaryColor , false ),
190192 ' )'
191193 }))
192194 end
@@ -304,15 +306,16 @@ function render_typst_brand_yaml()
304306 end
305307
306308 local headings = _quarto .modules .brand .get_typography (' headings' )
307- if headings and next (headings ) or _quarto .modules .brand .get_color (' foreground' ) then
309+ local foregroundColor = _quarto .modules .brand .get_color (' foreground' )
310+ if headings and next (headings ) or foregroundColor then
308311 base = base or {}
309312 headings = headings or {}
310313 meta .brand .typography .headings = {
311314 family = headings .family or base .family ,
312315 weight = headings .weight or base .weight ,
313316 style = headings .style or base .style ,
314317 decoration = headings .decoration or base .decoration ,
315- color = headings .color or _quarto . modules . brand . get_color ( ' foreground ' ) ,
318+ color = headings .color or foregroundColor ,
316319 [' background-color' ] = headings [' background-color' ] or base [' background-color' ],
317320 [' line-height' ] = line_height_to_leading (headings [' line-height' ] or base [' line-height' ]),
318321 }
0 commit comments