fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.52k stars 273 forks source link

Tags功能不显示文章,而Categories功能正常 #129

Closed lirenchong closed 6 years ago

lirenchong commented 6 years ago

Tags功能不显示文章,而Categories功能正常

第一眼在所有主题中就看中了Archive的赏心悦目,决定深度使用,挖掘各种潜能。感谢作者。

问题描述

mark

作为0基础,花了两天时间鼓捣Hexo的新手,在搜寻过网上各种方法后,对Tag功能点击后无法显示对应文章的问题,不知道接下来该从哪个角度入手解决了。

点击各个页面的标签,Tag功能均无效。

已经尝试过

title: tags
date: 2015-10-20 06:49:50
type: "tags"
comments: false

均无效。

你是否已经阅读过以下内容,并确认你的行为是正确的,在 [ ] 中填入 x 选中(Ensure that you had consulted followings and confirm the validity of your operation, fill x in [ ] to select)

如何复现(To Reproduce)

已部署上线的页面地址 https://lirenchong.com/

打开控制台,填写控制台中打印的主题的版本,如果脚本出错可直接提供控制台截图(Open the console and report the version of hexo-theme-archer. You can paste the screenshot on console directly if there is error with script)

信息 (please complete the following information):

和浏览器(Browser)无关:360极速浏览器,iPhone、Android都同样显示

fi3ework commented 6 years ago

你好,感谢使用,issue template 填的这么仔细很赞。 我看了一下你的 https://lirenchong.com/content.json ,发现有 category 但是没有 tag 的属性。 是不是没有在文章的 markdown 中写 tag 的 front-matter 呢? 正确的姿势如下 image

fi3ework commented 6 years ago

顺便说一句,archer 的 tag 用的不是 hexo 自带的那种方法,不需要额外配置 tags,只需按照文档中的安装方法来安装必要的插件再在文章中写 tag 的 front-matter 即可。

lirenchong commented 6 years ago

front-matter我应该有写的,按照Front-matter 这篇教程有尝试过并将所有_post的md文章都修改过了。

比如 大脑认知资源限制与普遍的拖延这一篇的设置如下。

title: 大脑认知资源限制与普遍的拖延
date: 2018-07-05 15:26:59
tags:
- 拖延
- 认知瘫痪
- GTD
- 时间管理
- 执行意图
- 番茄工作法
categories: 时计
header_image: http://pb2l0ws93.bkt.clouddn.com/lirenchong/180705/4DF3I0E2ga.jpg?imageslim

问题应该不是出在此处。

会不会是在部署环境、或安装hexo、或install archer时,有哪些地方出错了?或者是应对配置文件出错了?


需要安装官方说明中提到的这些 插件 吗?

fi3ework commented 6 years ago

能提供一下 hexo 的 config 的 jsonContent 字段是怎么配置的吗

lirenchong commented 6 years ago

添加sidebar启用支持

jsonContent: meta: true pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: true excerpt: false categories: true tags: true

巧了,没看到你的消息,刚打开_config.yml里面就看到
tags: false 改成true就好了

lirenchong commented 6 years ago

问题解决了,过程中学到了很多。谢谢~^ω^

fi3ework commented 6 years ago

是的,应该是 true 才对。应该直接从 archer 的文档中复制即可,文档中有配置好的参数~