Skip to content

Commit

Permalink
fix: make title setting generate <meta property="og:title">
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The [`title` setting](https://vike.dev/title) now also adds the `<meta property="og:title">` tag; if you generate it yourself then make sure to remove it.
  • Loading branch information
brillout committed Aug 2, 2024
1 parent 853d734 commit a0ce8d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vike-solid/renderer/onRenderHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const onRenderHtml: OnRenderHtmlAsync = async (pageContext): ReturnType<OnRender
const title = getHeadSetting("title", pageContext);
const favicon = getHeadSetting("favicon", pageContext);

const titleTag = !title ? "" : escapeInject`<title>${title}</title>`;
const titleTag = !title ? "" : escapeInject`<title>${title}</title><meta property="og:title" content="${title}">`;
const faviconTag = !favicon ? "" : escapeInject`<link rel="icon" href="${favicon}" />`;

const Head = pageContext.config.Head || (() => <></>);
Expand Down

0 comments on commit a0ce8d4

Please sign in to comment.