修复CDN BUG,将Google APIs作为默认CDN & 修改Gravatar的配置位置

This commit is contained in:
ppoffice 2015-11-06 16:23:42 +08:00
parent f82df5f528
commit 77214cca3c
6 changed files with 17 additions and 14 deletions

View File

@ -1,5 +1,5 @@
# Logo
logo: css/images/logo.png # Empty this to unset logo
logo: css/images/logo.png # Empty this to unset logo and show site title in the same place
# Header
menu:
@ -14,9 +14,8 @@ excerpt_link: Read More
fancybox: true
# Profile
profile: true # whether to show profile bar
gravatar: false # whether to use gravatar with the email
showlogo: false # whether to show the logo in the header
profile: true # Whether to show profile bar
gravatar: false # Whether to use gravatar with the email. If you do, put your email address in your site's `_config.yml`.
# Sidebar
sidebar: right # set to false if you don't want a sidebar
@ -41,7 +40,10 @@ links:
Hexo: http://hexo.io
# CDN
cdn: useso #If your site loads slowly change it to "google" , because "useso" is slow out of China
cdn: # You can choose "useso" instead of "google apis"(default).
# cdn: useso
# OR
# cdn:
# Miscellaneous
google_site_verification:

View File

@ -11,6 +11,7 @@ author_title: 'Web Developer & Designer'
avatar: css/images/avatar.png
location: 'Harbin, China'
follow: https://github.com/ppoffice/
email: # Your email (Used to show Gravatar).
language: en
timezone:
since: 2000 # The start year showing in your copyright section.

View File

@ -1,5 +1,5 @@
<% if (theme.cdn == "google"){ %>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } else if (theme.cdn == "useso"){ %>
<% if (theme.cdn == "useso"){ %>
<script src="//ajax.useso.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } else { %>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<% } %>

View File

@ -1,7 +1,7 @@
<% if (theme.cdn == "google"){ %>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<% } else if (theme.cdn == "useso"){ %>
<% if (theme.cdn == "useso"){ %>
<link href='//fonts.useso.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
<link href="//fonts.useso.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<% } else { %>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<% } %>

View File

@ -10,7 +10,7 @@
<% if(theme.profile) { %>
<nav id="sub-nav">
<div class="profile" id="profile-nav">
<a id="profile-anchor" href="javascript:;"><img class="avatar" src="<%= ( theme.gravatar ? gravatar(theme.email) : url_for(config.avatar)) %>"><i class="fa fa-caret-down"></i></a>
<a id="profile-anchor" href="javascript:;"><img class="avatar" src="<%= ( theme.gravatar ? gravatar(config.email) : url_for(config.avatar)) %>"><i class="fa fa-caret-down"></i></a>
</div>
</nav>
<% } %>

View File

@ -1,7 +1,7 @@
<aside id="profile">
<div class="inner profile-inner">
<div class="base-info profile-block">
<img id="avatar" src="<%= ( theme.gravatar ? gravatar(theme.email) : url_for(config.avatar)) %>">
<img id="avatar" src="<%= ( theme.gravatar ? gravatar(config.email) : url_for(config.avatar)) %>">
<h2 id="name"><%= config.author %></h2>
<h3 id="title"><%= config.author_title %></h3>
<span id="location"><i class="fa fa-map-marker"></i><%= config.location %></span>