hexo-theme-hipaper
hexo-theme-hipaper copied to clipboard
categories和tags页面404
请问应用了您的主题后categories和tags 出现了404 Not found的错误,请问是怎么回事呢,我看了您的示例,categories和tags是可用的。我用的是hexo 3.2.2
@icanfly 你可以参考一下我的Hexo源目录: https://github.com/iTimeTraveler/hexo-theme-hiero/tree/site-source
@iTimeTraveler 非常感谢,之前设置成type: "tags"了,导致不成功,受其它主题影响,而您这个主题是设置layout: "tags"
@icanfly 这块确实比较乱,我也被困扰过很久。。
@iTimeTraveler 还有一个问题,请问如何设置404页面呢,如果访问的url不存在会出现光突突的404 not found
@icanfly ok,我更新了我上面的Hexo源目录: https://github.com/iTimeTraveler/hexo-theme-hiero/tree/site-source 在 source/目录下你可以看到一个404.html 你看看这个就好了,Hexo支持原生的html页面。
我参考的是知乎的这个回答:hexo 怎么创建 404 页面? 你试试吧
@iTimeTraveler 非常感谢。
@iTimeTraveler @icanfly 给楼上两位兄弟点赞!
请问你一下,顶部header那边的Categories,Tags,About点击后都提示: Cannot GET /categories/ Cannot GET /tags/ Cannot GET /about/ 这个是为什么呢?T_T...
@niniyang 你参考一下我上面贴的Hexo的源目录,应该就能解决
您好,参考贴的源目录的意思是直接down下来然后覆盖原目录吗?
@justinmars 不建议覆盖你的原目录,最好单独新建一个目录用来测试,然后对比你的和我这个目录中的区别就能解决很多问题了
More explicitly, if you're getting a "Cannot get /categories/" error, I figured out that I needed to make a new page i.e.
$ hexo new page categories
$ hexo new page tags
and then in the frontmatter put
layout: "categories"
layout: "tags"
respectively. (I first had type: "tags"
which didn't work). The post should be blank otherwise. See
https://raw.githubusercontent.com/iTimeTraveler/hexo-theme-hiero/site-source/source/categories/index.md
After that, you should get a page showing up at localhost:4000/categories
or wherever your blog is
原來是layout: "tags" 我想說怎麼到底文件在哪裡 _config都找不到
順便問一下 為甚麼 archieves 不用生出 hexo new page *** 就可以有default layout ?
Why archieves dont need to hexo new page
and change the layout?
之前看到的官网说明一直是 type: "tags" 之后修改为 layout: "tags" 网页竟然显示正常了~