added ogimage test

This commit is contained in:
mohankumarpaluru 2024-05-19 15:37:25 +05:30
parent aecc70efc3
commit 5f20fdea57
4 changed files with 5 additions and 4 deletions

6
package-lock.json generated
View File

@ -3198,9 +3198,9 @@
}
},
"node_modules/katex": {
"version": "0.16.8",
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.8.tgz",
"integrity": "sha512-ftuDnJbcbOckGY11OO+zg3OofESlbR5DRl2cmN8HeWeeFIV7wTXvAOx8kEjZjobhA+9wh2fbKeO6cdcA9Mnovg==",
"version": "0.16.10",
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.10.tgz",
"integrity": "sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==",
"funding": [
"https://opencollective.com/katex",
"https://github.com/sponsors/katex"

View File

@ -16,7 +16,7 @@ export default (() => {
const baseDir = fileData.slug === "404" ? path : pathToRoot(fileData.slug!)
const iconPath = joinSegments(baseDir, "static/icon.png")
const ogImagePath = `https://${cfg.baseUrl}/static/og-image.png`
const ogImagePath = fileData.frontmatter?.ogImage?.url ?? 'https://cdn.jsdelivr.net/gh/mohankumarpaluru/Matrix-Notes@main/public/assets/blog/preview/cover.jpg';
return (
<head>

View File

@ -93,6 +93,7 @@ declare module "vfile" {
lang: string
enableToc: string
cssclasses: string[]
ogImage?: {url: string}
}>
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 76 KiB