mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
if is_home()
|
|
- var top_img = theme.index_img || theme.default_top_img
|
|
else if is_archive()
|
|
- var top_img = theme.archive_img || theme.default_top_img
|
|
else if is_tag()
|
|
- var top_img = theme.tag_img || theme.default_top_img
|
|
else if is_category()
|
|
- var top_img = theme.category_img || theme.default_top_img
|
|
else if is_current('/movies/', [strict])
|
|
- var top_img = theme.movies_img || theme.default_top_img
|
|
else if !is_post()
|
|
- var top_img = page.top_img || theme.default_top_img
|
|
|
|
- var without_index = url.replace('index.html', '')
|
|
- var without_html = without_index.replace('.html', '')
|
|
|
|
//- 預解析
|
|
include ./head/dns_prefetch.pug
|
|
|
|
//- PWA
|
|
if (theme.pwa && theme.pwa.enable)
|
|
include ./head/pwa.pug
|
|
|
|
//- 網站驗證
|
|
include ./head/site_verification.pug
|
|
|
|
//- Open_Graph
|
|
include ./head/Open_Graph.pug
|
|
|
|
if theme.disable_baidu_transformation
|
|
meta(http-equiv="Cache-Control" content="no-transform")
|
|
meta(http-equiv="Cache-Control" content="no-siteapp")
|
|
|
|
if page.hide == true
|
|
meta(name="robots" content="noindex")
|
|
|
|
script(src=url_for(theme.CDN.js_cookies))
|
|
|
|
if (theme.darkmode && theme.darkmode.enable) || theme.autoChangeMode !== false
|
|
include ./head/darkmode.pug
|
|
|
|
each item in theme.CDN_USE.css
|
|
link(rel='stylesheet', href=url_for(item))
|
|
|
|
if (theme.fancybox && theme.fancybox.enable)
|
|
link(rel='stylesheet', href=url_for(theme.CDN.fancybox_css))
|
|
|
|
if (theme.snackbar && theme.snackbar.enable)
|
|
link(rel='stylesheet', href=url_for(theme.CDN.snackbar_css))
|
|
|
|
if theme.canonical
|
|
link(rel="canonical" href=without_html)
|
|
|
|
if is_post()
|
|
if(page.prev)
|
|
link(rel="prev" title=page.prev.title href=url_for(page.prev.permalink) )
|
|
if(page.next)
|
|
link(rel="next" title=page.next.title href=url_for(page.next.permalink) )
|
|
|
|
if theme.algolia_search.enable
|
|
link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.algolia_search_css))
|
|
script(src=url_for(theme.CDN.algolia_search) defer)
|
|
|
|
if (theme.gitalk && theme.gitalk.enable)
|
|
link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.gitalk_css))
|
|
script(src=url_for(theme.CDN.gitalk))
|
|
script(src=url_for(theme.CDN.blueimp_md5))
|
|
|
|
//- google_adsense
|
|
include ./head/google_adsense.pug
|
|
|
|
//- analytics
|
|
include ./head/analytics.pug
|
|
|
|
if !is_post()
|
|
link(rel="preload" href=url_for(top_img) as="image" )
|
|
|
|
if theme.blog_title_font.font_link
|
|
link(rel='stylesheet', href=url_for(theme.blog_title_font.font_link)) |