Skip to content

Commit

Permalink
add RSS icon support
Browse files Browse the repository at this point in the history
  • Loading branch information
stiekel committed Jul 16, 2016
1 parent 3331dea commit 0d52415
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 8 deletions.
9 changes: 9 additions & 0 deletions README.CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ social:

如果您喜欢的社交网站不在其中,欢迎提 [issue](https://github.com/stiekel/hexo-theme-random/issues)。

## 添加 RSS 图标

在上面的 `social` 配置项目中,添加一个索引名为 `RSS`,值为订阅地址的项目即可:

```yml
social:
rss: http://chensd.com/feed
```

## 第三方服务的配置

本主题支持 [Google Analytics](https://www.google.com/analytics/) / [百度统计](http://tongji.baidu.com/web/welcome/login) / [Disqus](https://disqus.com/) / [多说](http://duoshuo.com/) / [友言](http://www.uyan.cc/) / [JiaThis](http://www.jiathis.com/),即可以在主题配置文件中设置,也可以在博客的主配置文件中设置,增加项目如下:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ It will replace text into icon automaticalcally, Random theme support to show ic

If you need more, please create [issue](https://github.com/stiekel/hexo-theme-random/issues).

## Add RSS Icon

If you want add RSS icon to social links, please add the following code at the `social` section in config file:

```yml
social:
rss: http://chensd.com/feed
```

## Third party Service

Random support [Google Analytics](https://www.google.com/analytics/) / [Baidu Tongji](http://tongji.baidu.com/web/welcome/login) / [Disqus](https://disqus.com/) / [Duoshuo](http://duoshuo.com/) / [Uyan](http://www.uyan.cc/) / [JiaThis](http://www.jiathis.com/), You can config these in theme config file or hexo main config file:
Expand Down
4 changes: 3 additions & 1 deletion layout/includes/social-icon.swig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{% for i in Object.keys( socialConfig ) %}
<li>
<a href="{{ socialConfig[i] }}">
{% if socialConfig[i] && socialConfig[i]|replace('douban.com', '', 'g') !== socialConfig[i] %}
{% if i && i|lower === 'rss' %}
<i class="icon iconfont rss">&#xe60e;</i>
{% elif socialConfig[i] && socialConfig[i]|replace('douban.com', '', 'g') !== socialConfig[i] %}
<i class="icon iconfont douban">&#xe609;</i>
{% elif socialConfig[i] && socialConfig[i]|replace('twitter.com', '', 'g') !== socialConfig[i] %}
<i class="icon iconfont twitter">&#xe600;</i>
Expand Down
11 changes: 6 additions & 5 deletions source/css/iconfont/iconfont.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1466980635'); /* IE9*/
src: url('iconfont.eot?t=1466980635#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff?t=1466980635') format('woff'), /* chrome, firefox */
url('iconfont.ttf?t=1466980635') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1466980635#iconfont') format('svg'); /* iOS 4.1- */
src: url('iconfont.eot?t=1468664156'); /* IE9*/
src: url('iconfont.eot?t=1468664156#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff?t=1468664156') format('woff'), /* chrome, firefox */
url('iconfont.ttf?t=1468664156') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1468664156#iconfont') format('svg'); /* iOS 4.1- */
}

.iconfont {
Expand All @@ -19,6 +19,7 @@
.icon-sociallinkedin:before { content: "\e601"; }
.icon-weibo:before { content: "\e602"; }
.icon-google:before { content: "\e603"; }
.icon-rss:before { content: "\e60e"; }
.icon-facebook:before { content: "\e604"; }
.icon-lofter:before { content: "\e60d"; }
.icon-dribbble:before { content: "\e605"; }
Expand Down
Binary file modified source/css/iconfont/iconfont.eot
Binary file not shown.
8 changes: 6 additions & 2 deletions source/css/iconfont/iconfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/css/iconfont/iconfont.ttf
Binary file not shown.
Binary file modified source/css/iconfont/iconfont.woff
Binary file not shown.
2 changes: 2 additions & 0 deletions source/css/random.styl
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ article img
color: #444;
.quora:hover
color: #b92b27;
.rss:hover
color: #D35400;
.side-navigate
position: fixed;
top: 60%;
Expand Down

0 comments on commit 0d52415

Please sign in to comment.