Hexo-theme-next: social_icon如果设置为false的话name也不显示了

Created on 31 Mar 2016  ·  2Comments  ·  Source: iissnan/hexo-theme-next

Expected behavior (预期行为)

image

Actual behavior (实际行为)

image

Steps to reproduce the behavior (重现步骤)

NexT Version, NexT Scheme

NexT Version:

  • [x] Master
  • [ ] Latest Release
  • [ ] Old version -

NexT Scheme:

  • [ ] Muse
  • [x] Mist
  • [ ] Pisces

Other Information (Like Browser, System, Screenshots)

看了下是sidebar.swig的代码逻辑有点小问题。71行开始的代码:

        <div class="links-of-author motion-element">
          {% if theme.social %}
            {% for name, link in theme.social %}
              <span class="links-of-author-item">
                <a href="{{ link }}" target="_blank">
                  {% if theme.social_icons.enable %}
                    <i class="fa fa-{{ theme.social_icons[name] || 'globe' }}"></i> {{ name }}
                  {% endif %}
                </a>
              </span>
            {% endfor %}
          {% endif %}
        </div>

一旦false了,name也就没了。所以将name移出if判断即可。
已提交PR

Bug Template

All 2 comments

我看之前有人提到过这个bug:
https://github.com/iissnan/hexo-theme-next/issues/525

已 Merge,谢谢

Was this page helpful?
0 / 5 - 0 ratings

Related issues

online picture online  ·  3Comments

Nirvanada picture Nirvanada  ·  4Comments

blueyi picture blueyi  ·  5Comments

liyuan989 picture liyuan989  ·  3Comments

iTofu picture iTofu  ·  4Comments