mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:50:54 +08:00
breaking changes: Open_Graph_meta 設置更改,可配置其它參數
feature: 更新 Facebook sdk 到 v15 improvement: 更新 plugins.yml Remove: 移除 meta keywords
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user