mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 19:04:06 -06:00
newww
This commit is contained in:
parent
6f11f7a546
commit
bae9a3cf77
@ -236,6 +236,7 @@ export const customImage: SocialImageOptions["imageStructure"] = (
|
|||||||
|
|
||||||
The following example includes a customized social image with a custom background and formatted date:
|
The following example includes a customized social image with a custom background and formatted date:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```typescript title="custom-og.tsx"
|
```typescript title="custom-og.tsx"
|
||||||
export const og: SocialImageOptions["Component"] = (
|
export const og: SocialImageOptions["Component"] = (
|
||||||
cfg: GlobalConfiguration,
|
cfg: GlobalConfiguration,
|
||||||
@ -266,7 +267,7 @@ export const og: SocialImageOptions["Component"] = (
|
|||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
backgroundImage: `url("https://\${cfg.baseUrl}/static/og-image.jpeg")`,
|
backgroundImage: `url("https://${cfg.baseUrl}/static/og-image.jpeg")`,
|
||||||
backgroundSize: "100% 100%",
|
backgroundSize: "100% 100%",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -295,7 +296,7 @@ export const og: SocialImageOptions["Component"] = (
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={`"https://\${cfg.baseUrl}/static/icon.jpeg"`}
|
src={`"https://${cfg.baseUrl}/static/icon.jpeg"`}
|
||||||
style={{
|
style={{
|
||||||
position: "relative",
|
position: "relative",
|
||||||
backgroundClip: "border-box",
|
backgroundClip: "border-box",
|
||||||
@ -358,3 +359,4 @@ export const og: SocialImageOptions["Component"] = (
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
Loading…
Reference in New Issue
Block a user