Skip to content

Commit

Permalink
feat: config keys change
Browse files Browse the repository at this point in the history
  • Loading branch information
kitian616 committed Oct 22, 2017
1 parent a108901 commit 5e01729
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 44 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ bundle exec jekyll serve -H 0.0.0.0

### 评论系统

_config.yml 文件的 `disqus_shortname` 项填上你在 [Disqus](https://disqus.com/) 上为网站建立的 site 对应的 shortname,需要注意的是 Disqus 在大陆是无法直接访问的。
_config.yml 文件的 `disqus.shortname` 项填上你在 [Disqus](https://disqus.com/) 上为网站建立的 site 对应的 shortname,需要注意的是 Disqus 在大陆是无法直接访问的。

> 注意:使用评论系统必须在文章的头信息中设置 key 值。
Expand Down
22 changes: 12 additions & 10 deletions _config.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ lang: zh #the language of your site
timezone: Asia/Shanghai

## Author & social ##
author: Someone
email: someone@mail.com #your Email address e.g. someone@site.com
facebook_username: someone #your Facebook username
twitter_username: someone #your Twitter username
github_username: someone #your GitHub username
googleplus_username: someone #your Google+ username
weibo_username: someone #your Weibo username
douban_username: someone #your Douban username
linkedin_username: someone #your Linkedin username
author:
name: Someone
email: someone@mail.com #your Email address e.g. someone@site.com
facebook: someone #your Facebook username
twitter: someone #your Twitter username
github: someone #your GitHub username
googleplus: someone #your Google+ username
weibo: someone #your Weibo username
douban: someone #your Douban username
linkedin: someone #your Linkedin username

## Comment system (Disqus) ##
# disqus_shortname: #the Disqus shortname for the site
disqus:
# shortname: #the Disqus shortname for the site

## Google Analytics ##
# ga_tracking_id: #Google analytics id for the site
Expand Down
29 changes: 16 additions & 13 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,29 @@ lang: zh #the language of your site
timezone: Asia/Shanghai

## Author & social ##
author: Someone
email: someone@mail.com #your Email address e.g. someone@site.com
# facebook_username: #your Facebook username
# twitter_username: #your Twitter username
# github_username: a #your GitHub username
# googleplus_username: #your Google+ username
# weibo_username: #your Weibo username
# douban_username: #your Douban username
# linkedin_username: #your Linkedin username
author:
name: Someone
# email: #your Email address e.g. someone@site.com
# facebook: #your Facebook username
# twitter: #your Twitter username
# github: #your GitHub username
# googleplus: #your Google+ username
# weibo: #your Weibo username
# douban: #your Douban username
# linkedin: #your Linkedin username

## Comment system (Disqus) ##
# disqus_shortname: #the Disqus shortname for the site
disqus:
# shortname: #the Disqus shortname for the site

## Google Analytics ##
# ga_tracking_id: #Google analytics id for the site

## Reading quantity (LeanCloud) ##
# app_id: #LeanCloud App id
# app_key: #LeanCloud App key
# app_class: #LeanCloud App class
leancloud:
# app_id: #LeanCloud App id
# app_key: #LeanCloud App key
# app_class: #LeanCloud App class

## Paginate ##
paginate: 5
Expand Down
4 changes: 2 additions & 2 deletions _includes/blog/article-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<meta itemprop="author" itemscope itemtype="https://schema.org/Person">
{% if page.author %}
<meta itemprop="name" content="{{ page.author }}"/>
{% elsif site.author %}
<meta itemprop="name" content="{{ site.author }}"/>
{% elsif site.author.name %}
<meta itemprop="name" content="{{ site.author.name }}"/>
{% endif %}
</meta>
{% endif %}
Expand Down
32 changes: 16 additions & 16 deletions _includes/info/follow-me.html
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
<div class="follow-me">
<ul class="inline-list" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="{{ site.author }}">
<meta itemprop="name" content="{{ site.author.name }}">
<link itemprop="url" href="{{ '/' | prepend: site.url }}">
{% if site.weibo_username %}
{% if site.author.weibo %}
<li title="Follow me on Weibo.">
<div class="round-button weibo">
<a itemprop="sameAs" href="https://weibo.com/{{ site.weibo_username }}" target="_blank">
<a itemprop="sameAs" href="https://weibo.com/{{ site.author.weibo }}" target="_blank">
<div class="icon">{% include icon/social/weibo.svg %}</div>
</a>
</div>
</li>
{% endif %}
{% if site.facebook_username %}
{% if site.author.facebook %}
<li title="Follow me on Facebook.">
<div class="round-button facebook">
<a itemprop="sameAs" href="https://www.facebook.com/{{ site.facebook_username }}" target="_blank">
<a itemprop="sameAs" href="https://www.facebook.com/{{ site.author.facebook }}" target="_blank">
<div class="icon">{% include icon/social/facebook.svg %}</div>
</a>
</div>
</li>
{% endif %}
{% if site.twitter_username %}
{% if site.author.twitter %}
<li title="Follow me on Twitter.">
<div class="round-button twitter">
<a itemprop="sameAs" href="https://twitter.com/{{ site.twitter_username }}" target="_blank">
<a itemprop="sameAs" href="https://twitter.com/{{ site.author.twitter }}" target="_blank">
<div class="icon">{% include icon/social/twitter.svg %}</div>
</a>
</div>
</li>
{% endif %}
{% if site.googleplus_username %}
{% if site.author.googleplus %}
<li title="Follow me on Google+.">
<div class="round-button googlepluse">
<a itemprop="sameAs" href="https://plus.google.com/u/0/{{ site.googleplus_username }}" target="_blank">
<a itemprop="sameAs" href="https://plus.google.com/u/0/{{ site.author.googleplus }}" target="_blank">
<div class="icon">{% include icon/social/googleplus.svg %}</div>
</a>
</div>
</li>
{% endif %}
{% if site.github_username %}
{% if site.author.github %}
<li title="Follow me on Github.">
<div class="round-button github">
<a itemprop="sameAs" href="https://github.com/{{ site.github_username }}" target="_blank">
<a itemprop="sameAs" href="https://github.com/{{ site.author.github }}" target="_blank">
<div class="icon">{% include icon/social/github.svg %}</div>
</a>
</div>
</li>
{% endif %}
{% if site.linkedin_username %}
{% if site.author.linkedin %}
<li title="Follow me on Linkedin.">
<div class="round-button linkedin">
<a itemprop="sameAs" href="https://www.linkedin.com/in/{{ site.linkedin_username }}" target="_blank">
<a itemprop="sameAs" href="https://www.linkedin.com/in/{{ site.author.linkedin }}" target="_blank">
<div class="icon">{% include icon/social/linkedin.svg %}</div>
</a>
</div>
</li>
{% endif %}
{% if site.douban_username %}
{% if site.author.douban %}
<li title="Follow me on Douban.">
<div class="round-button douban">
<a itemprop="sameAs" href="https://www.douban.com/people/{{ site.douban_username }}" target="_blank">
<a itemprop="sameAs" href="https://www.douban.com/people/{{ site.author.douban }}" target="_blank">
<div class="icon">{% include icon/social/douban.svg %}</div>
</a>
</div>
</li>
{% endif %}
</ul>
{% if site.email %}
{% if site.author.email %}
<p class="email">
<a title="Send me Email." href="mailto:{{ site.email }}" target="_self"> {{ site.email }} </a>
</p>
Expand Down
4 changes: 2 additions & 2 deletions _includes/utils/comment-disqus.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if site.disqus_shortname and page.key %}
{% if site.disqus.shortname and page.key %}
<div id="disqus_thread"></div>
<script>

Expand All @@ -13,7 +13,7 @@

(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://{{ site.disqus_shortname }}.disqus.com/embed.js';
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
Expand Down

0 comments on commit 5e01729

Please sign in to comment.