various changes
This commit is contained in:
@@ -7,7 +7,6 @@ interface Props {
|
||||
|
||||
import { metaData } from "../config";
|
||||
import { SEO } from "astro-seo";
|
||||
import { getImagePath } from "astro-opengraph-images";
|
||||
import { JoyUIRootIsland } from "./Components"
|
||||
import { useHtmlThemeAttr } from "../hooks/useHtmlThemeAttr";
|
||||
import { usePrimeReactThemeSwitcher } from "../hooks/usePrimeReactThemeSwitcher";
|
||||
@@ -15,12 +14,6 @@ import { usePrimeReactThemeSwitcher } from "../hooks/usePrimeReactThemeSwitcher"
|
||||
const { title, description = metaData.description, image } = Astro.props;
|
||||
|
||||
const { url, site } = Astro;
|
||||
const openGraphImageUrl = getImagePath({ url, site });
|
||||
|
||||
// If the image is not provided, use the default image
|
||||
const openGraphImage = image
|
||||
? new URL(image, url.href).href
|
||||
: openGraphImageUrl;
|
||||
|
||||
---
|
||||
|
||||
@@ -34,7 +27,7 @@ const openGraphImage = image
|
||||
basic: {
|
||||
title: title || metaData.title,
|
||||
type: "website",
|
||||
image: openGraphImageUrl,
|
||||
image: "",
|
||||
url: url,
|
||||
},
|
||||
optional: {
|
||||
|
Reference in New Issue
Block a user