Hexo-theme-next: 不显示 description

Created on 5 Mar 2017  ·  13Comments  ·  Source: iissnan/hexo-theme-next

Expected behavior (预期行为)

qq 20170305142733

Actual behavior (实际行为)

qq 20170305142814

Steps to reproduce the behavior (重现步骤)

使用这个提交
qq 20170305142829

NexT Informations

Add the ✔ sign before an item which is affected by this behavior.

NexT Version: 3.2.2

NexT Scheme: Pisces

Other Informations (Like Browser, System, Screenshots)

Most helpful comment

遇到相同的问题,还好有萌妹子提交issue 😄
只好在站点配置文件 _config.yml 下增加新项

signature: blablabla

All 13 comments

第一张的效果是hexo s 本地效果吗?第二张的效果是github pages还是vps上的tomcat等服务器呢?

恩 第一张是 hexo s
第二张是以前的版本在 github pages 上的

或许你可以删除public->hexo g->hexo s->hexo d,重新上传试试看看。

如果搞不定的话,升级版本?

Hexo是最新稳定版,NextGithub上的最新提交。
删除public后问题依旧存在

这是我之前的issues:https://github.com/iissnan/hexo-theme-next/issues/820

结果我在VPS上重装了一下Tomcat就好了。

Github上的,我可能不能提供很大的帮助,或许你对比github上的html源文件和Public,我就经常推送失败。

我是本地hexo s测试的。。。
因为有问题所以就没上传。。。

主题配置文件里的 seo 值是 true 还是 false? 目前模板里的判断:

{% if theme.seo %}
  <p class="site-description motion-element" itemprop="description">{{ theme.signature }}</p>
{% else %}
  <p class="site-description motion-element" itemprop="description">{{ theme.description }}</p>
{% endif %}

seo 设定为 true 的时候,description 设定的值将写入 head;同时每篇文章都可以写 description,以便更好的支持 SEO。此时,Sidebar 的签名将由 signature 代替。

好像git更新的时候_config.yml有冲突,于是先还原了之后更新,然后自己又改了一次配置。。。
顺手就把这个seo给开了的样子。。。
顺便建议配置文件不要让用户直接改_config.yml,支持在其他文件如_config.inc.yml里写自己的配置。。。
免得版本更新麻烦。。。

为何seo开启的时候要用signature来代替description呢?
统一一下不好么。。。

从语义上理解,signature 更适合那个位置,description 更适合于 SEO。

你可以在 站点目录/source/_data/ 目录下新建一个 next.yml,NexT 会读取这份文档的配置(继承了 _config.yml的配置)。只是这份文档并未有 processor 去处理,所以每次有修改,需要重启 hexo server,配置才会生效。

好的,谢谢 0.0

文档中我并没看到有关seo配置的说明,是不是应该加上呢?
比如放到常见问题里 0.0

遇到相同的问题,还好有萌妹子提交issue 😄
只好在站点配置文件 _config.yml 下增加新项

signature: blablabla
Was this page helpful?
0 / 5 - 0 ratings

Related issues

iTofu picture iTofu  ·  4Comments

blueyi picture blueyi  ·  5Comments

ifyour picture ifyour  ·  4Comments

bingstyle picture bingstyle  ·  3Comments

liyuan989 picture liyuan989  ·  3Comments