Skip to content

Commit 9ae4e63

Browse files
committed
Include a title block if a subtitle is present
Fixes #4764
1 parent be1f37e commit 9ae4e63

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/resources/formats/html/pandoc/template.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
$if(title)$
3636
$title-block.html()$
37+
$elseif(subtitle)$
38+
$title-block.html()$
3739
$endif$
3840

3941
$if(toc)$

src/resources/formats/html/pandoc/title-block.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<header id="title-block-header">
2-
<h1 class="title">$title$</h1>
2+
$if(title)$<h1 class="title">$title$</h1>$endif$
33
$if(subtitle)$
44
<p class="subtitle">$subtitle$</p>
5-
65
$endif$
76
$for(author)$
87
<p class="author">$author$</p>

src/resources/formats/html/templates/banner/title-block.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<header id="title-block-header" class="quarto-title-block default$if(quarto-template-params.banner-header-class)$ $quarto-template-params.banner-header-class$$endif$">
33
<div class="quarto-title-banner">
44
<div class="quarto-title column-body">
5-
<h1 class="title">$title$</h1>
5+
$if(title)$<h1 class="title">$title$</h1>$endif$
66
$if(subtitle)$
77
<p class="subtitle lead">$subtitle$</p>
88
$endif$

0 commit comments

Comments
 (0)