Skip to content

Commit 1fbb445

Browse files
committed
feat: Override type and url tag content
1 parent c9f47fa commit 1fbb445

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/resources/types/schema-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ export type OpenGraphConfig = {
331331
provided in the `open-graph` metadata, Quarto will use the website or
332332
book `title` by default. */;
333333
locale?: string; /* Locale of open graph metadata */
334+
type?: string; /* Content to use for the `og:type` tag */
335+
url?: string; /* Content to use for the `og:url` tag */
334336
} & SocialMetadata;
335337

336338
export type PageFooter = {

src/resources/types/zod/schema-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ export const ZodOpenGraphConfig = z.object({
269269
"image-height": z.number(),
270270
locale: z.string(),
271271
"site-name": z.string(),
272+
type: z.string(),
273+
url: z.string(),
272274
}).strict().partial();
273275

274276
export const ZodPageFooter = z.object({
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Override Open Graph"
3+
description: "A test post for Open Graph metadata overrides."
4+
date: "2026-04-02"
5+
author: "Quarto Tester"
6+
website:
7+
open-graph:
8+
type: website
9+
url: https://www.example.com/
10+
_quarto:
11+
render-project: true
12+
tests:
13+
html:
14+
ensureFileRegexMatches:
15+
-
16+
- '<meta property="og:type" content="website">'
17+
- '<meta property="og:url" content="https://www.example.com/">'
18+
- []
19+
---
20+
21+
This is a test post with overridden Open Graph metadata.

0 commit comments

Comments
 (0)