Skip to content

Commit

Permalink
Added icon for blogrolls.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlynxZhou committed Aug 23, 2018
1 parent a17c56e commit a2aa107
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -237,10 +237,14 @@ blogroll:
links:
- name: Display Name
link: Link Address
icon: Font Awesome icon tag you want to use
- name: Display Name
link: Link Address
icon: Font Awesome icon tag you want to use
```

Get icons in [Font Awesome](https://fontawesome.com/).

### Comment Support

First set `comment` to `enable: true` to enable comment in all pages (except Home, Archives, Categories, Tags), then fill your Disqus Shortname. If you want to disable comment in some pages, add front-matter `comment: false` (`comment` NOT `comments`!).
Expand Down
4 changes: 4 additions & 0 deletions README.zh_CN.md
Expand Up @@ -238,10 +238,14 @@ blogroll:
links:
- name: 显示名称
link: 网页地址
icon: 你所使用的 Font Awesome 图标的 HTML 标签
- name: 显示名称
link: 网页地址
icon: 你所使用的 Font Awesome 图标的 HTML 标签
```

前往 [Font Awesome](https://fontawesome.com/) 获取你想要的图标。

### 评论系统

首先将 `comment``enable` 设成 `true` 以全局启用评论(首页、归档、分类、标签页面除外),然后填入你的 Disqus Shortname。如果你有哪个页面想单独关闭评论,添加文件头 `comment: false``comment` 不是 `comments`!)。
Expand Down
3 changes: 3 additions & 0 deletions _config.yml.example
Expand Up @@ -128,10 +128,13 @@ blogroll:
links:
- name: GitHub
link: https://github.com/
icon: <i class="fas fa-link"></i>
- name: MDN
link: https://developer.mozilla.org/
icon: <i class="fas fa-link"></i>
- name: Nunjucks
link: https://mozilla.github.io/nunjucks/
icon: <i class="fas fa-link"></i>

# `comment.commentjs.type`: Choose between `github` and `oschina`.
comment:
Expand Down
2 changes: 1 addition & 1 deletion layout/sidebar.njk
Expand Up @@ -41,7 +41,7 @@
<div><i class="fas fa-link"></i>{{ __("blogroll")}}</div>
<ul>
{% for e in theme.blogroll.links %}
<li><a href="{{ e.link }}" target="_blank">{{ e.name }}</a></li>
<li>{% if e.icon %}{{ e.icon }}{% endif %}<a href="{{ e.link }}" target="_blank">{{ e.name }}</a></li>
{% endfor %}
</ul>
</div>
Expand Down

0 comments on commit a2aa107

Please sign in to comment.