Allow third-party resources to customize the SEO image

Context::addMetaImage() 메소드를 사용하여 특정 페이지 공유시 SNS에 표시되는
이미지를 좀더 세부적으로 커스터마이징할 수 있습니다.
This commit is contained in:
Kijin Sung 2020-12-29 15:48:49 +09:00
parent 00d17ec8fc
commit 48f5190445
2 changed files with 42 additions and 1 deletions

View file

@ -500,7 +500,11 @@ class HTMLDisplayHandler
}
// Add image.
if ($page_type === 'article' && $permitted && config('seo.og_extract_images'))
if ($document_images = Context::getMetaImages())
{
// pass
}
elseif ($page_type === 'article' && $permitted && config('seo.og_extract_images'))
{
if (($document_images = Rhymix\Framework\Cache::get("seo:document_images:$document_srl")) === null)
{