Hexo-theme-next: How to set empty key of social links and only show label icons on sidebar (如何设置侧边栏不显示社交链接名, 只显示图标)

Created on 27 Jun 2017  ·  6Comments  ·  Source: iissnan/hexo-theme-next

How to show only social icons without the name of the social link on the sidebar, e.g., only show Facebook icon, without the name "Facebook" on the sidebar? (How to set empty key value for social links name?)

如何设置侧边栏上不显示社交链接网站的名字, 只要图标, 比如只要 Facebook 的图标, 而不要显示 "Facebook" + Facebook 图标?

Most helpful comment

you can change sidebar.swig

 <a href="{{ link }}" title="{{ name }}" target="_blank">{{ name }}</a>

to

 <a href="{{ link }}" title="{{ name }}" target="_blank"></a>

All 6 comments

you can change sidebar.swig

 <a href="{{ link }}" title="{{ name }}" target="_blank">{{ name }}</a>

to

 <a href="{{ link }}" title="{{ name }}" target="_blank"></a>

Need to add switch option here.

@zhuzhuyule Then how to set the _config.yml?

@wendingp for now with standart methods is not possible. You may use decision by @zhuzhuyule and it must work fine.

@wendingp alright, check PART 3 in #1697 pull, there is needed by you option.

@wendingp if you modify the sidebar.swig file, don't about _config.yml.

Suggest:

  1. revert sidebar.swig
  2. then update theme 'NexT'
  3. Modify _config.yml
social_icons:
  enable: true
  icons_only: true
  transition: false

like PART 3 in #1697 pull

Was this page helpful?
0 / 5 - 0 ratings

Related issues

syscca picture syscca  ·  4Comments

payne4handsome picture payne4handsome  ·  4Comments

liyuan989 picture liyuan989  ·  3Comments

online picture online  ·  3Comments

chy9002 picture chy9002  ·  3Comments