Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/changelog-1.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ All changes included in 1.11:
- ([#15057](https://github.com/quarto-dev/quarto-cli/pull/15057)): Fix a numeric top-level `image-width` or `image-height` in page front matter failing the render. These options were never used, so they are removed from the schema; declare the preview image size under `open-graph` instead.
- ([#15083](https://github.com/quarto-dev/quarto-cli/pull/15083)): Fix editors offering no completion for the top-level `image-title` option that about pages read, and correct the description of the top-level `image-lazy-loading` option, which only affects the page's image when it appears in a listing.
- ([#15084](https://github.com/quarto-dev/quarto-cli/pull/15084)): Fix page-level `open-graph` and `twitter-card` options not being validated, which let a misspelled option be silently ignored and a value of the wrong type crash the render. These options are now checked like their `website` counterparts, so a page or `_metadata.yml` with an unknown option under `open-graph` or `twitter-card`, which was ignored before, now fails to render with an error naming the option.
- ([#15091](https://github.com/quarto-dev/quarto-cli/pull/15091)): Fix page-level `bread-crumbs`, `back-to-top-navigation`, `page-navigation`, `margin-header` and `margin-footer` options not being validated or offered for completion in editors. A page value of the wrong type now fails to render with an error instead of being accepted silently.
- ([#15091](https://github.com/quarto-dev/quarto-cli/pull/15091)): Fix `open-graph: false` or `twitter-card: false` in page front matter or `_metadata.yml` not disabling Open Graph or Twitter Card metadata for that page when the website enables it.

## Lua API

Expand Down
6 changes: 4 additions & 2 deletions src/project/types/website/website-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,12 @@ export function metadataHtmlPostProcessor(
// alias metadata
const metadata = provider.metadata;

// If not explicitly enabled, skip this provider
// If disabled by the page or not explicitly enabled, skip this provider
const siteMeta = format.metadata[kWebsite] as Metadata;
if (
!format.metadata[provider.key] && (!siteMeta || !siteMeta[provider.key])
format.metadata[provider.key] === false ||
(!format.metadata[provider.key] &&
(!siteMeta || !siteMeta[provider.key]))
) {
return;
}
Expand Down
73 changes: 66 additions & 7 deletions src/resources/editor/tools/vs-code.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20657,6 +20657,60 @@ var require_yaml_intelligence_resources = __commonJS({
},
description: "Setting this to false prevents the `repo-actions` from appearing on this page.\nOther possible values are `none` or one or more of `edit`, `source`, and `issue`, *e.g.* `[edit, source, issue]`.\n"
},
{
name: "bread-crumbs",
schema: "boolean",
tags: {
formats: [
"$html-doc"
]
},
description: "Setting this to false hides the navigation breadcrumbs on this page."
},
{
name: "back-to-top-navigation",
schema: "boolean",
tags: {
formats: [
"$html-doc"
]
},
description: "Setting this to false hides the 'back to top' navigation button on this page."
},
{
name: "page-navigation",
schema: "boolean",
tags: {
formats: [
"$html-doc"
]
},
description: "Show (`true`) or hide (`false`) the next and previous page links in the footer of this page."
},
{
name: "margin-header",
schema: {
maybeArrayOf: "string"
},
tags: {
formats: [
"$html-doc"
]
},
description: "Markdown to place above margin content on this page (text or file path), after the `website` margin header."
},
{
name: "margin-footer",
schema: {
maybeArrayOf: "string"
},
tags: {
formats: [
"$html-doc"
]
},
description: "Markdown to place below margin content on this page (text or file path), after the `website` margin footer."
},
{
name: "aliases",
schema: {
Expand Down Expand Up @@ -20726,7 +20780,7 @@ var require_yaml_intelligence_resources = __commonJS({
"$html-doc"
]
},
description: "Publish open graph metadata for this page. Options set here are merged\nwith the `open-graph` options of the `website` metadata.\n"
description: "Publish open graph metadata for this page. Options set here are merged\nwith the `open-graph` options of the `website` metadata. Set to `false`\nto omit open graph metadata from this page.\n"
},
{
name: "twitter-card",
Expand All @@ -20744,7 +20798,7 @@ var require_yaml_intelligence_resources = __commonJS({
"$html-doc"
]
},
description: "Publish twitter card metadata for this page. Options set here are merged\nwith the `twitter-card` options of the `website` metadata.\n"
description: "Publish twitter card metadata for this page. Options set here are merged\nwith the `twitter-card` options of the `website` metadata. Set to `false`\nto omit twitter card metadata from this page.\n"
},
{
name: "image-lazy-loading",
Expand Down Expand Up @@ -24812,6 +24866,11 @@ var require_yaml_intelligence_resources = __commonJS({
short: "Links to source repository actions",
long: "Links to source repository actions (<code>none</code> or one or more\nof <code>edit</code>, <code>source</code>, <code>issue</code>)"
},
"Setting this to false hides the navigation breadcrumbs on this\npage.",
"Setting this to false hides the \u2018back to top\u2019 navigation button on\nthis page.",
"Show (<code>true</code>) or hide (<code>false</code>) the next and\nprevious page links in the footer of this page.",
"Markdown to place above margin content on this page (text or file\npath), after the <code>website</code> margin header.",
"Markdown to place below margin content on this page (text or file\npath), after the <code>website</code> margin footer.",
"URLs that alias this document, when included in a website.",
{
short: "The path to a preview image for this document.",
Expand All @@ -24822,8 +24881,8 @@ var require_yaml_intelligence_resources = __commonJS({
short: "The title for the main image on the about page.",
long: "The title for the main image on the about page. Used when\n<code>about</code> does not set its own <code>image-title</code>."
},
"Publish open graph metadata for this page. Options set here are\nmerged with the <code>open-graph</code> options of the\n<code>website</code> metadata.",
"Publish twitter card metadata for this page. Options set here are\nmerged with the <code>twitter-card</code> options of the\n<code>website</code> metadata.",
"Publish open graph metadata for this page. Options set here are\nmerged with the <code>open-graph</code> options of the\n<code>website</code> metadata. Set to <code>false</code> to omit open\ngraph metadata from this page.",
"Publish twitter card metadata for this page. Options set here are\nmerged with the <code>twitter-card</code> options of the\n<code>website</code> metadata. Set to <code>false</code> to omit twitter\ncard metadata from this page.",
{
short: "If true, this page\u2019s image in a listing will only load when it comes\ninto view.",
long: 'Enables lazy loading for this page\u2019s image when the page appears as\nan item in a listing. If true, the listing image element will have\n<code>loading="lazy"</code>, and will only load when it comes into\nview.\nIf false, the image will load immediately. This overrides the\nlisting\u2019s <code>image-lazy-loading</code> option for this item.'
Expand Down Expand Up @@ -25764,12 +25823,12 @@ var require_yaml_intelligence_resources = __commonJS({
mermaid: "%%"
},
"handlers/mermaid/schema.yml": {
_internalId: 219833,
_internalId: 221293,
type: "object",
description: "be an object",
properties: {
"mermaid-format": {
_internalId: 219825,
_internalId: 221285,
type: "enum",
enum: [
"png",
Expand All @@ -25785,7 +25844,7 @@ var require_yaml_intelligence_resources = __commonJS({
exhaustiveCompletions: true
},
theme: {
_internalId: 219832,
_internalId: 221292,
type: "anyOf",
anyOf: [
{
Expand Down

Large diffs are not rendered by default.

73 changes: 66 additions & 7 deletions src/resources/editor/tools/yaml/web-worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading