<script>
    var CONFIG = window.CONFIG || {};
    var ZHAOO = window.ZHAOO || {};
    CONFIG = {
        isHome: <%= is_home() %>,
        fancybox: <%= theme.fancybox %>,
        pjax: <%= theme.pjax || false %>,
        loading: {
            gif: '<%= theme.loading.gif %>',
            lottie: '<%= theme.loading.lottie %>'
        },
        lazyload: {
            enable: <%= theme.lazyload.enable %>,
            only_post: '<%= theme.lazyload.only_post %>',
            loading: {
                gif: '<%= theme.lazyload.loading.gif %>',
                lottie: '<%= theme.lazyload.loading.lottie %>'
            }
        },
        donate: {
            enable: <%= theme.donate.enable %>,
            alipay: '<%= theme.donate.alipay %>',
            wechat: '<%= theme.donate.wechat %>'
        },
        galleries: {
            enable: <%= theme.galleries.enable %>
        },
        fab: {
            enable: <%= theme.fab.enable %>,
            always_show: <%= theme.fab.always_show %>
        },
        carrier: {
            enable: <%= theme.carrier.enable %>
        },
        preview: {
            background: {
                default: '<%= theme.preview.background.default %>',
                api: '<%= theme.preview.background.api %>'
            },
            motto: {
                default: '<%= theme.preview.motto.default %>',
                typing: <%= theme.preview.motto.typing %>,
                api: '<%- theme.preview.motto.api %>',
                data_contents: '<%- theme.preview.motto.data_contents && JSON.stringify(theme.preview.motto.data_contents) %>'
            },
        },
        qrcode: {
            enable: <%= theme.qrcode.enable %>,
            type: '<%= theme.qrcode.type %>',
            image: '<%= theme.qrcode.image %>',
        },
        toc: {
            enable: <%= theme.toc.enable %>
        },
        scrollbar: {
            type: '<%= theme.scrollbar.type %>'
        },
        notification: {
            enable: <%= theme.notification.enable %>,
            delay: <%= theme.notification.delay || 4500 %>,
            list: '<%- site.data.notification && JSON.stringify(site.data.notification) %>',
            page_white_list: '<%- theme.notification.page_white_list && JSON.stringify(theme.notification.page_white_list) %>',
            page_black_list: '<%- theme.notification.page_black_list && JSON.stringify(theme.notification.page_black_list) %>'
        },
        search: {
            enable: <%= theme.search.enable %>,
            path: <%- config.search && config.search.path ? `'${config.search.path}'` : `''` %>
        }
    }
</script>