Skip to content

Commit

Permalink
feat: add Zhihu icon
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Jan 27, 2019
1 parent 542453b commit 677ec62
Show file tree
Hide file tree
Showing 20 changed files with 50 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TeXt 是针对个人或团队网站、博客、项目、文档等的一款高度
- 国际化
- 搜索
- 目录
- 作者(电子邮件,Facebook,Twitter,领英,微博,知乎等。支持多作者配置
- 作者(支持多个
- 附加样式(提示,标签,图片,图标,按钮,栅格等)
- 扩展(音频,视频,幻灯片,在线示例)
- Markdown 增强([MathJax](https://www.mathjax.org/)[mermaid](https://mermaidjs.github.io/)[chartjs](http://www.chartjs.org/)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TeXt is a super customizable Jekyll theme for personal site, team site, blog, pr
- Internationalization
- Search
- Table of contents
- Authors (Email, Facebook, Twitter, Linkedin, Weibo, Zhihu, etc)
- Authors
- Additional styles (alert, tag, image, icon, button, grid, etc)
- Extensions (audios, videos, slides, demos)
- Markdown enhancements ([MathJax](https://www.mathjax.org/), [mermaid](https://mermaidjs.github.io/), [chartjs](http://www.chartjs.org/))
Expand Down
27 changes: 14 additions & 13 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ author:
googleplus: # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
zhihu : # "user_name" the last part of your profile url, e.g. https://www.zhihu.com/people/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name
github : # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name

Expand Down Expand Up @@ -153,6 +154,16 @@ pageview:
app_class : # LeanCloud App class


## => Search
##############################
search:
provider: default # "default" (default), false, "google", "custom"

## Google Custom Search Engine
google:
custom_search_engine_id: # Google Custom Search Engine ID


## => Analytics
##############################
analytics:
Expand All @@ -164,16 +175,6 @@ analytics:
anonymize_ip: false # Anonymize IP tracking for Analytics


## => Search
##############################
search:
provider: default # "default" (default), false, "google", "custom"

## Google Custom Search Engine
google:
custom_search_engine_id: # Google Custom Search Engine ID


## => Build
##############################
markdown : kramdown
Expand Down Expand Up @@ -219,4 +220,4 @@ plugins:
- jekyll-feed
- jekyll-paginate
- jekyll-sitemap
- jemoji
- jemoji
8 changes: 8 additions & 0 deletions _includes/author-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
</li>
{%- endif -%}

{%- if _author.zhihu -%}
<li title="{{ __return | replace: '[NAME]', 'Zhihu' }}">
<a class="button button--circle zhihu-button" itemprop="sameAs" href="https://www.zhihu.com/people/{{ _author.zhihu }}" target="_blank">
<div class="icon">{%- include svg/icon/social/zhihu.svg -%}</div>
</a>
</li>
{%- endif -%}

{%- if _author.douban -%}
<li title="{{ __return | replace: '[NAME]', 'Douban' }}">
<a class="button button--circle douban-button" itemprop="sameAs" href="https://www.douban.com/people/{{ _author.douban }}" target="_blank">
Expand Down
3 changes: 3 additions & 0 deletions _sass/components/_author-links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
.medium-button {
@include clickable($text-color-1, $medium-color);
}
.zhihu-button {
@include clickable($text-color-1, $zhihu-color);
}
.douban-button {
@include clickable($text-color-1, $douban-color);
}
Expand Down
1 change: 1 addition & 0 deletions _sass/skins/_chocolate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$zhihu-color: #0084ff;
$douban-color: #42bd56;
$linkedin-color: #1074af;
$github-color: #000;
Expand Down
1 change: 1 addition & 0 deletions _sass/skins/_dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$zhihu-color: #0084ff;
$douban-color: #42bd56;
$linkedin-color: #1074af;
$github-color: #000;
Expand Down
1 change: 1 addition & 0 deletions _sass/skins/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$zhihu-color: #0084ff;
$douban-color: #42bd56;
$linkedin-color: #1074af;
$github-color: #000;
Expand Down
1 change: 1 addition & 0 deletions _sass/skins/_forest.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$zhihu-color: #0084ff;
$douban-color: #42bd56;
$linkedin-color: #1074af;
$github-color: #000;
Expand Down
1 change: 1 addition & 0 deletions _sass/skins/_ocean.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$zhihu-color: #0084ff;
$douban-color: #42bd56;
$linkedin-color: #1074af;
$github-color: #000;
Expand Down
1 change: 1 addition & 0 deletions _sass/skins/_orange.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $weibo-color: #e6162d;
$google-plus-color:#ea4335;
$telegram-color: #32afed;
$medium-color: #000;
$zhihu-color: #0084ff;
$douban-color: #42bd56;
$linkedin-color: #1074af;
$github-color: #000;
Expand Down
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TeXt is a super customizable Jekyll theme for personal site, team site, blog, pr
- Internationalization
- Search
- Table of contents
- Authors (Email, Facebook, Twitter, Linkedin, Weibo, Zhihu, etc)
- Authors
- Additional styles (alert, tag, image, icon, button, grid, etc)
- Extensions (audios, videos, slides, demos)
- Markdown enhancements ([MathJax](https://www.mathjax.org/), [mermaid](https://mermaidjs.github.io/), [chartjs](http://www.chartjs.org/))
Expand Down
1 change: 1 addition & 0 deletions docs/_config.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ author:
googleplus: 1
telegram : 1
medium : 1
zhihu : 1
douban : 1
linkedin : 1
github : 1
Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ author:
googleplus: 101827554735084402671
telegram :
medium :
zhihu :
douban :
linkedin :
github : kitian616/jekyll-TeXt-theme
Expand Down
5 changes: 3 additions & 2 deletions docs/_data/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Tian Qi:
googleplus: 101827554735084402671 # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
zhihu : # "user_name" the last part of your profile url, e.g. https://www.zhihu.com/people/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name
github : kitian616 # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name
2 changes: 1 addition & 1 deletion docs/_docs/en/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Short introduction for site author

Username or id of site author’s social networks.

TeXt supports Email, Facebook, Twitter, Weibo, Google Plus, Telegram, Medium, Douban, Linkedin, Github and Npm, more to be added.
TeXt supports Email, Facebook, Twitter, Weibo, Google Plus, Telegram, Medium, Zhihu, Douban, Linkedin, Github and Npm, more to be added.

Depending on your settings, the social network buttons would show on every pages' footer.

Expand Down
5 changes: 3 additions & 2 deletions docs/_docs/en/2.5-authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Tian Qi:
googleplus: 101827554735084402671 # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
zhihu : # "user_name" the last part of your profile url, e.g. https://www.zhihu.com/people/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name
github : kitian616 # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name
```
Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/zh/2.1-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ timezone: Asia/Shanghai

社交网站的用户名或用户 ID。

目前支持邮件、微博、FacebookTwitter、微博、Google PlusTelegramMedium、豆瓣、LinkedinGithub 和 Npm,持续添加中。
目前支持邮件,微博,FacebookTwitter,微博,Google PlusTelegramMedium,知乎,豆瓣,LinkedinGithub 和 Npm,持续添加中。

当你设置了相应项的值后,对应的社交按钮就会出现在页面下方。

Expand Down
5 changes: 3 additions & 2 deletions docs/_docs/zh/2.5-authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Tian Qi:
googleplus: 101827554735084402671 # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
zhihu : # "user_name" the last part of your profile url, e.g. https://www.zhihu.com/people/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name
github : kitian616 # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name
```
Expand Down
6 changes: 3 additions & 3 deletions test/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ theme: jekyll-text-theme # Gem-based Jekyll Themes
# | | | .-. : .' \ '-. .-'
# | | \ --. / .'. \ | |
# `--' `----''--' '--' `--'

## => Site Settings
##############################
text_skin: default # "default" (default), "dark", "forest", "ocean", "chocolate", "orange"
Expand Down Expand Up @@ -47,8 +46,9 @@ author:
googleplus: # "user_id" the last part of your profile url, e.g. https://plus.google.com/u/0/user_id
telegram : # "user_name" the last part of your profile url, e.g. https://t.me/user_name
medium : # "user_name" the last part of your profile url, e.g. https://medium.com/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name/
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name/
zhihu : # "user_name" the last part of your profile url, e.g. https://www.zhihu.com/people/user_name
douban : # "user_name" the last part of your profile url, e.g. https://www.douban.com/people/user_name
linkedin : # "user_name" the last part of your profile url, e.g. https://www.linkedin.com/in/user_name
github : # "user_name" the last part of your profile url, e.g. https://github.com/user_name
npm : # "user_name" the last part of your profile url, e.g. https://www.npmjs.com/~user_name

Expand Down

0 comments on commit 677ec62

Please sign in to comment.