[www] Meta Image size added
This commit is contained in:
1 parent
2bdceaecb8
commit
16a8719927
2 files changed
+6
No files matched your search
@@ -104,8 +104,12 @@ function getMeta(article) {
|
||||
try {
|
||||
const artifact = article.preview.findArtifact(types)
|
||||
meta.image = artifact.url
|
||||
meta.imageWidth = artifact.width
|
||||
meta.imageHeight = artifact.height
|
||||
} catch (error) {
|
||||
meta.image = 'https://art.shlisselburg.org/entrance.jpg'
|
||||
meta.imageWidth = 1200
|
||||
meta.imageHeight = 630
|
||||
}
|
||||
}
|
||||
return meta
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<meta property="og:title" content="{{meta.title}}">
|
||||
<meta property="og:description" content="{{meta.description}}">
|
||||
<meta property="og:image" content="{{meta.image}}">
|
||||
<meta property="og:image:width" content="{{meta.imageWidth}}">
|
||||
<meta property="og:image:height" content="{{meta.imageHeight}}">
|
||||
<meta property="og:url" content="{{meta.url}}">
|
||||
<meta property="og:site_name" content="Шлиссельбургская Детская Художественная Школа">
|
||||
<meta property="og:locale" content="ru_RU">
|
||||
|
||||
Reference in new issue
Block a user