hexo-theme-butterfly/layout/includes/head/config_site.pug
Jerry aa7173fc69 feature: 增加 tags 標簽外掛 - label
improvement: 優化 pjax 下 404 頁面
2021-04-25 22:08:07 +08:00

20 lines
717 B
Plaintext

-
let isHighlightShrink
if (theme.highlight_shrink == 'none') isHighlightShrink = 'undefined'
else if (page.highlight_shrink === true || page.highlight_shrink === false) isHighlightShrink = page.highlight_shrink
else isHighlightShrink = theme.highlight_shrink
var pageToc = page.toc === true || page.toc === false ? page.toc : theme.toc.enable
var showToc = is_post() && theme.aside.enable && pageToc && (toc(page.content) !== '' || page.encrypt == true )
-
script#config-diff.
var GLOBAL_CONFIG_SITE = {
title: '!{pageTitle}',
isPost: !{is_post()},
isHome: !{is_home()},
isHighlightShrink: !{isHighlightShrink},
isToc: !{showToc},
postUpdate: '!{full_date(page.updated)}'
}