-
Notifications
You must be signed in to change notification settings - Fork 393
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
(I think this might be related to #13247)
When using a custom title-block.html template partial, the title-block-header header element is created incorrectly, even if using the default title-block.html file directly from the documentation.
Steps to reproduce
Here's how to reproduce. First, here's the expected output:
With this index.qmd:
---
title: "I am a title"
subtitle: "I am a subtitle"
date: 2026-01-03
---
Here's some text.…and this _quarto.yml:
project:
type: website
website:
title: "A neat website"
…the title area renders like this:
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">I am a title</h1>
<p class="subtitle lead">I am a subtitle</p>
</div>
<div class="quarto-title-meta">
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">January 3, 2026</p>
</div>
</div>
</div>
</header>
Actual behavior
To break things, use this for index.qmd:
---
title: "I am a title"
subtitle: "I am a subtitle"
date: 2026-01-03
format:
html:
template-partials:
- title-block.html
---
Here's some text.…and this for title-block.html. This comes directly from src/resources/formats/html/pandoc/title-block.html and is the file linked from the documentation on HTML template partials
<header id="title-block-header">
$if(title)$<h1 class="title">$title$</h1>$endif$
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$
$for(author)$
<p class="author">$author$</p>
$endfor$
$if(date)$
<p class="date">$date$</p>
$endif$
$if(abstract)$
<div class="abstract">
<div class="abstract-title">$abstract-title$</div>
$abstract$
</div>
$endif$
</header>The title area now renders like this:
<header id="title-block-header" class="quarto-title-block">
<h1 class="title display-7">I am a title</h1>
</header>
<header id="title-block-header">
<p class="subtitle lead">I am a subtitle</p>
<p class="date">January 3, 2026</p>
</header>with each title element (title, subtitle + date) wrapped in a separate div with the id title-block-header. Additionally, the date doesn't get any of the special Quarto additions like quarto-title-meta-contents.
Expected behavior
Based on the documentation, it seems like using the default title-block.html should create the same header area, but using it somehow bypasses lots of the extra Quarto processing like handling metadata, etc., so that in the end it creates two title-block-header divs, which shouldn't happen.
Your environment
- Positron Version: 2025.12.2 build 5 (though this happens in RStudio and the terminal too—it's not IDE-dependent)
- macOS Tahoe 26.1
Quarto check output
❯ quarto check
Quarto 1.9.16
[✓] Checking environment information...
Quarto cache location: /Users/andrew/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.16
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/andrew/Library/TinyTeX/bin/universal-darwin
Version: 2025
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.5.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/andrew/Library/R/arm64/4.5/library
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.50
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.13.1
Path: /Users/andrew/.virtualenvs/quarto/bin/python3
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation...