hexo-theme-yelee icon indicating copy to clipboard operation
hexo-theme-yelee copied to clipboard

在所有文章列表中有文章,但是首页确不显示

Open Gabrielkaliboy opened this issue 7 years ago • 5 comments

最近pull了一下,有问题啊,老大快来看一看

Gabrielkaliboy avatar Aug 14 '17 12:08 Gabrielkaliboy

我找了一下,发现是layout/_partial/head.ejs中的这段代码的search: <%= theme.search.on %>定义有问题

<script>
    var yiliaConfig = {
        fancybox: <%=theme.fancybox%>,
        animate: <%=theme.animate%>,
        isHome: <%=is_home()%>,
        isPost: <%=is_post()%>,
        isArchive: <%=is_archive()%>,
        isTag: <%=is_tag()%>,
        isCategory: <%=is_category()%>,
        fancybox_js: "<%- theme.CDN.fancybox_js %>",
        scrollreveal: "<%- theme.CDN.scrollreveal %>",
        search: <%= theme.search.on %>
    }
</script>

而在_config.xml的默认设置是search:onload:false,这里写的是onload而不是on,导致Uncaught ReferenceError: yiliaConfig is not defined,把两边的变量名改成一样就可以了,比如_config.xml里面的search:onload false改成search:on false,这样就正常运行了

kinoko3 avatar Aug 28 '17 13:08 kinoko3

其实首页右侧是有内容的 只不过被设置成了透明,文件 lyout/_partial/head.ejs 中第48行 <% if (is_home() && theme.animate){ %> <style> .article { opacity: 0;} </style> <% } %> opacity的值为0,改为1后就可以显示了

eclipseman avatar Sep 08 '17 07:09 eclipseman

终于看见了 感谢。。

myndtt avatar Oct 27 '17 12:10 myndtt

看到了,谢谢 @eclipseman

cnscorpions avatar Nov 16 '17 03:11 cnscorpions

遇到同样的问题,已解决。

kondongx avatar Mar 03 '18 13:03 kondongx