breaking changes: Open_Graph_meta 設置更改,可配置其它參數

feature: 更新 Facebook sdk 到 v15
improvement: 更新 plugins.yml
Remove: 移除 meta keywords
This commit is contained in:
Jerry
2022-10-21 18:10:52 +08:00
Unverified
parent f775e97548
commit 21f71cd0f2
11 changed files with 31 additions and 30 deletions

View File

@@ -1,11 +1,13 @@
if theme.Open_Graph_meta
- let contentType = is_post() ? 'article' : 'website'
- let metaImage = (page.cover || theme.avatar.img) ? full_url_for(page.cover || theme.avatar.img) : ''
- let fb_appId = theme.facebook_comments.app_id || ''
- let fb_admins = theme.facebook_comments.user_id || ''
!= open_graph({type: contentType, image: metaImage, fb_admins: fb_admins, fb_app_id: fb_appId})
if theme.Open_Graph_meta.enable
-
let ogOption = Object.assign({
type: is_post() ? 'article' : 'website',
image: (page.cover || theme.avatar.img) ? full_url_for(page.cover || theme.avatar.img) : '',
fb_admins: theme.facebook_comments.user_id || '',
fb_app_id: theme.facebook_comments.app_id || '',
}, theme.Open_Graph_meta.option)
-
!= open_graph(ogOption)
else
meta(name="description" content=page_description())