Skip to content

Quarto website treats h1 as quarto-title-block if no title in frontmatter #11686

@simonsteiger

Description

@simonsteiger

Bug description

Hello,

After updating to 1.6.39, quarto websites began treating a raw html h1 as the page title, which appears to drop any other CSS attached to said h1.

Maybe this behaviour is intended; it came as a surprise for me at least.

Steps to reproduce

Here's the example that caused the error.

Setting title to "" (or removing it from the frontmatter entirely) causes "upper-content" class to be overridden by quarto's title block.

---
title: "test" # works
# title: ""   # doesn't work
---

```{=html}
<div class="upper-content">
    <h1>Turing.jl</h1>
</div>
```

And the corresponding styles.css:

.upper-content {
    color: red;
}

Expected behavior

The words "Turing.jl" should show up in red.

Actual behavior

The words "Turing.jl" show up in black (CSS class "upper-content" was not applied).

Your environment

  • I ran quarto preview on the terminal
  • MacOS Sequoia 15.1.1

Quarto check output

Quarto 1.6.39
[✓] Checking environment information...
      Quarto cache location: /Users/simonsteiger/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.39
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: 869685

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/simonsteiger/Library/TinyTeX/bin/universal-darwin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.6
      Path: /opt/homebrew/opt/python@3.11/bin/python3.11
      Jupyter: 5.5.0
      Kernels: julia-1.11, julia-1.10, julia-1.8, julia-1.9

      NOTE: No Jupyter kernel for Python found

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.43
      rmarkdown: 2.23

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions