mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-25 13:41:12 +00:00
Handle image_src in metadata layout
The CMS is already using `image`, which is an object based on data from the API.
This commit is contained in:
parent
4c2a90966a
commit
6692d06e5f
1 changed files with 6 additions and 0 deletions
|
@ -25,10 +25,16 @@
|
|||
|
||||
//- Image
|
||||
-if (metadata && metadata.image)
|
||||
//- from the CMS
|
||||
meta(itemprop="image", name="image", content=metadata.image.fields.file.url)
|
||||
-else if (metadata && metadata.image_src)
|
||||
//- pages with custom metadata images, metadata.image_src is the full image URL
|
||||
meta(itemprop="image", name="image", content=metadata.image_src)
|
||||
-else if (settings.overleaf)
|
||||
//- the default image for Overleaf
|
||||
meta(itemprop="image", name="image", content=buildImgPath('ol-brand/overleaf_og_logo.png'))
|
||||
-else
|
||||
//- the default image for ShareLaTeX
|
||||
meta(itemprop="image", name="image", content='/touch-icon-192x192.png')
|
||||
|
||||
//- Keywords
|
||||
|
|
Loading…
Reference in a new issue