Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Website `og:site_name` ignores `open-graph.site-name`, because the site-title handler overwrites the first matching `meta` tag

オープン
#14,917 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
web-dev

調査の方向性

Read src/project/types/website/website-meta.ts, especially opengraphMetadata and the siteTitleMetaHandler, then reproduce with the documented quarto render and grep commands. Done means explicit open-graph.site-name remains in Quarto's og:site_name tag, and hand-written tags are not overwritten; verify the behavior on both index.qmd and about.qmd.

索引モデルが issue の本文から書いたものです。

説明

bug metadata
Bug description

On a website page, open-graph.site-name set in the document front matter is ignored.
og:site_name always carries the website title instead.

The schema says the opposite.
It says the website or book title is used only when site-name is not explicitly provided in the open-graph metadata.

The cause is that two passes build the tag, they disagree about which value wins, and the second one picks its target by position in the document rather than by ownership.

The first pass gets it right.
opengraphMetadata seeds site-name from the website title, then lets the merged site and document open-graph block overwrite it.
So the value handed to the tag writer is the document's site-name.

The second pass runs the markdown pipeline over the same document, right after.

siteTitleMetaHandler renders the website title and pushes it into og:site_name every time.
It finds the tag with doc.querySelector, which returns the first og:site_name element in the document.
It never checks that the element is the one the first pass just wrote.

On an ordinary page there is only one og:site_name tag, so the overwrite lands on Quarto's own tag and the document's site-name disappears without a word.
Put any earlier og:site_name tag in the head, through include-in-header for instance, and the overwrite lands on that tag instead.
Quarto's own tag is then left carrying the document site-name, which shows what the first pass really wrote.

titleMetaHandler selects og:title and twitter:title the same way, and descriptionMetaHandler does the same for og:description and twitter:description.

Those four never show a wrong value, because both passes work them out from the same expression.
They do still write into a tag the project did not create, so a page that supplies its own social tags has them rewritten.

This matters for any extension or template that writes Open Graph tags of its own.
The effect is easy to misread as the extension corrupting Quarto's output.

Steps to reproduce

Create a stock website project.

quarto create project website ogsite --no-open --no-prompt

Set the site title in _quarto.yml and leave the rest of the scaffold alone.

project:
  type: website

website:
  title: "SITE TITLE"
  navbar:
    left:
      - href: index.qmd
        text: Home
      - about.qmd

format:
  html:
    theme:
      - cosmo
      - brand
    css: styles.css
    toc: true

Replace index.qmd.

---
title: "Home"
open-graph:
  site-name: "DOCUMENT SITE NAME"
---

`og:site_name` in the head of this page should be `DOCUMENT SITE NAME`.

Replace about.qmd with the same page, plus one hand-written tag in the head.

---
title: "About"
open-graph:
  site-name: "DOCUMENT SITE NAME"
format:
  html:
    include-in-header:
      - text: |
          <meta property="og:site_name" content="DECOY">
---

The same page, plus one hand-written `og:site_name` tag placed in the head before
Quarto writes its own.

Render, then read the tags back.

quarto render
grep -n '<meta property="og:site_name' _site/index.html _site/about.html
Actual behavior
_site/index.html:81:<meta property="og:site_name" content="SITE TITLE">
_site/about.html:76:<meta property="og:site_name" content="SITE TITLE">
_site/about.html:82:<meta property="og:site_name" content="DOCUMENT SITE NAME">

On index.qmd the document's site-name never appears at all.

On about.qmd the decoy tag receives SITE TITLE, even though a header include wrote it and it never held the website title.
Quarto's own tag keeps DOCUMENT SITE NAME, which is what it was written with.

Expected behavior

og:site_name should carry DOCUMENT SITE NAME on both pages, since both set open-graph.site-name explicitly.

The website title should only be the fallback, as the schema describes.

A tag the project did not write should also be left alone.
Selecting the element by ownership, or narrowing the selection to the tag the first pass created, would fix both halves.

Your environment
  • IDE: none, run from the terminal.
  • OS: macOS 26.6.2 on Apple Silicon.

It also reproduces on a build of main at a8bfe4037a966f9cf2bea4acbb4e7053701948ed, which is where the line references above point.

Quarto check output
$ quarto check
Quarto 1.10.18
[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.10.0: OK
      Dart Sass version 1.101.0: OK
      Deno version 2.7.14: OK
      Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.10.18
      Path: /Applications/Positron.app/Contents/Resources/app/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2026.07
      Chrome Headless Shell: (not installed)
      VeraPDF: (not installed)

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

[✓] Checking Chrome Headless....................OK
      Using: Chrome from QUARTO_CHROMIUM
      Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

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

[✓] Checking R installation...........OK
      Version: 4.6.1
      Path: /Library/Frameworks/R.framework/Versions/4.6/Resources
      LibPaths:
        - /Users/mcanouil/Library/R/arm64/4.6/library
        - /Library/Frameworks/R.framework/Versions/4.6/Resources/library
      knitr: 1.51
      rmarkdown: 2.31

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.6
      Path: /Library/Developer/CommandLineTools/usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking Julia installation...
主要言語
JavaScript
スター
6.1k
フォーク
466
平均マージ
20時間 30分
マージ済み PR(30日)
60

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quarto-dev/quarto-cli のほかの issue

quarto-dev/quarto-cli の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。