hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.2k stars 4.82k forks source link

is (is_post(),is_archive()...)系列函数的问题 #850

Closed howiefh closed 10 years ago

howiefh commented 10 years ago

现在使用hexo 2.8.3,主题使用我在landscape基础上修改的主题。发现每次hexo g后,侧边栏都有问题。about me,tag cloud 等等都不显示,只有archives会显示。是is_post(),is_archive()的问题,后来发现是is.js中的this.path的值不管在什么情况下都是archives/,所以is_post()总返回false,is_archive()总返回true,导致sidebar.ejs显示会有问题。

tommy351 commented 10 years ago

Try to disable fragment caching in https://github.com/hexojs/hexo-theme-landscape/blob/master/layout/layout.ejs

For example, modfiy the following line:

<%- partial('_partial/header', null, {cache: !config.relative_link}) %>

to

<%- partial('_partial/header') %>
howiefh commented 10 years ago

Thank you!