diff --git a/news/changelog-1.9.md b/news/changelog-1.9.md index 17971c59d6c..9a19a3ca453 100644 --- a/news/changelog-1.9.md +++ b/news/changelog-1.9.md @@ -62,6 +62,7 @@ All changes included in 1.9: - ([#13547](https://github.com/quarto-dev/quarto-cli/issues/13547))`cookie-content: { type: express }` is now the default. Previously it was `type: implied`. It now means this will block cookies until the user expressly agrees to allow them (or continue blocking them if the user doesn't agree). - ([#13570](https://github.com/quarto-dev/quarto-cli/pull/13570)): Replace Twitter with Bluesky in default blog template and documentation examples. New blog projects now include Bluesky social links instead of Twitter. - ([#13716](https://github.com/quarto-dev/quarto-cli/issues/13716)): Fix draft pages showing blank during preview when pre-render scripts are configured. +- ([#13847](https://github.com/quarto-dev/quarto-cli/pull/13847)): Open graph title with markdown is now processed correctly. (author: @mcanouil) ### `book` diff --git a/src/project/types/website/website-meta.ts b/src/project/types/website/website-meta.ts index 7f5afe68658..b37985436ef 100644 --- a/src/project/types/website/website-meta.ts +++ b/src/project/types/website/website-meta.ts @@ -506,7 +506,7 @@ function metaMarkdownPipeline(format: Format, extras: FormatExtras) { if (renderedEl) { // Update the document title const el = doc.querySelector( - `meta[name="og:site_name"]`, + `meta[property="og:site_name"]`, ); if (el) { el.setAttribute("content", renderedEl.innerText); diff --git a/tests/docs/smoke-all/2026/01/06/13847/.gitignore b/tests/docs/smoke-all/2026/01/06/13847/.gitignore new file mode 100644 index 00000000000..ad293093b07 --- /dev/null +++ b/tests/docs/smoke-all/2026/01/06/13847/.gitignore @@ -0,0 +1,2 @@ +/.quarto/ +**/*.quarto_ipynb diff --git a/tests/docs/smoke-all/2026/01/06/13847/_quarto.yml b/tests/docs/smoke-all/2026/01/06/13847/_quarto.yml new file mode 100644 index 00000000000..2df8ca97fcf --- /dev/null +++ b/tests/docs/smoke-all/2026/01/06/13847/_quarto.yml @@ -0,0 +1,17 @@ +project: + type: website + +website: + title: "Quarto CLI {{< var version >}}" + open-graph: true + navbar: + left: + - href: index.qmd + text: Home + right: + - icon: github + href: https://github.com/ + +format: + html: + theme: cosmo diff --git a/tests/docs/smoke-all/2026/01/06/13847/_variables.yml b/tests/docs/smoke-all/2026/01/06/13847/_variables.yml new file mode 100644 index 00000000000..2ef3d523ab5 --- /dev/null +++ b/tests/docs/smoke-all/2026/01/06/13847/_variables.yml @@ -0,0 +1 @@ +version: 1.0.0 diff --git a/tests/docs/smoke-all/2026/01/06/13847/index.qmd b/tests/docs/smoke-all/2026/01/06/13847/index.qmd new file mode 100644 index 00000000000..746cb5a7394 --- /dev/null +++ b/tests/docs/smoke-all/2026/01/06/13847/index.qmd @@ -0,0 +1,13 @@ +--- +title: "PR 13847: open graph metadata" +_quarto: + render-project: true + tests: + html: + ensureHtmlElements: + - + - 'meta[property="og:site_name"][content*="Quarto CLI 1.0.0"]' + - [] +--- + +This test check that the website title is correctly resolved when used in open graph site name, including when using a shortcode. \ No newline at end of file