hexo-theme-butterfly/layout/includes/head/config_site.pug
2021-05-09 00:53:56 +08:00

22 lines
765 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 )
let titleVal = pageTitle.replace(/'/ig,"\\'")
-
script#config-diff.
var GLOBAL_CONFIG_SITE = {
title: '!{titleVal}',
isPost: !{is_post()},
isHome: !{is_home()},
isHighlightShrink: !{isHighlightShrink},
isToc: !{showToc},
postUpdate: '!{full_date(page.updated)}'
}