zhwangart / hexo-theme-ocean

Ocean is a mobile-enabled Hexo theme based on the features in Hexo's default theme landscape.
https://zhwangart.com
Apache License 2.0
500 stars 87 forks source link

is_home()、is_post() 函数判断不正确 #18

Closed andus-top closed 5 years ago

andus-top commented 5 years ago

在busuanzi.ejs中,写入如下代码: is_home:<%- is_home() %> is_post:<%-` is_post() %> 不管是在主页,还是在文章内容页,结果都为false

zhwangart commented 5 years ago

也困扰我很久的问题,但是在其他网友的 hexo 上部署就能正常显示,我也曾在 hexo 上提过 issue https://github.com/hexojs/hexo/issues/3483

tootal commented 5 years ago

同样遇到这个问题。

andus-top commented 5 years ago

也困扰我很久的问题,但是在其他网友的 hexo 上部署就能正常显示,我也曾在 hexo 上提过 issue hexojs/hexo#3483

博主之前用hexo 3.8.0 解决过这个问题吗

zhwangart commented 5 years ago

博主之前用hexo 3.8.0 解决过这个问题吗

现在就是 3.8.0 并不曾解决~

andus-top commented 5 years ago

博主之前用hexo 3.8.0 解决过这个问题吗

现在就是 3.8.0 并不曾解决~

好吧,我用的hexo3.9.0。那我暂时就全部显示了。看起来也不是很伤大雅,哈哈哈

stevenjoezhang commented 5 years ago

建议将partial中的cache设置为false

andus-top commented 5 years ago

建议将partial中的cache设置为false

优秀,按照你的方式,果然可以,赞