Skip to content

Commit

Permalink
1.5.0
Browse files Browse the repository at this point in the history
Merge pull request #402 from viosey/canary
  • Loading branch information
neoFelhz committed Aug 24, 2017
2 parents f48e873 + 092b7a4 commit 9b82078
Show file tree
Hide file tree
Showing 102 changed files with 979 additions and 3,042 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ _config.yml

node_modules

.idea
.idea

.directory
91 changes: 89 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,90 @@
language: node_js
node_js:
- "4"
dist: trusty
node_js:
- "7"
install:
- npm install hexo-cli -g
before_script:
- git clone https://github.com/neko-dev/hexo-theme-test-ci.git --depth=5
- cd hexo-theme-test-ci
- rm -rf .git
- cd _hexo
- npm install
- git clone https://github.com/viosey/hexo-theme-material.git themes/material
- cd themes/material
- git checkout -t origin/canary
- git pull
- rm -rf .git
- cd ..
- cd ..
- cd ..
- cp -i _config.theme.yml _hexo/themes/material/_config.yml
- cd _hexo
script:
- hexo clean
- hexo g
- mkdir ./deploy-git
- cd ./deploy-git
- git init
- git config --global push.default matching
- git config --global user.email "${GitHubEmail}"
- git config --global user.name "${GitHubUser}"
- git remote add origin https://${GitHubKEY}@github.com/${GitHubRepo}.git
- git pull origin ${DeployBranch}
- rm -rf ./*
- cp -rf ../public/* ./
- git add --all .
- git commit -m "Travis Auto Tester for Material Theme"
- git push --quiet --force https://${GitHubKEY}@github.com/${GitHubRepo}.git
- cd ..
- cd ..
- npm install selenium-webdriver
- sed -i "s/{bs_user}/${BrowserstackUser}/g" test.js
- sed -i "s/{bs_key}/${BrowserstackKey}/g" test.js
- sed -i "s/{bs_project}/${BrowserstackProject}/g" test.js
- sed -i "s/{bs_build_number}/${TRAVIS_BUILD_NUMBER}/g" test.js
- sed -i "s/{bs_commit}/${TRAVIS_COMMIT}/g" test.js
- mkdir -p ./_output/img/OSX_Safari_10.0
- node test.js _config/OSX_Safari_10.0 OSX_Safari_10.0
- mkdir -p ./_output/img/w10_chrome_60.0
- node test.js _config/w10_chrome_60.0 w10_chrome_60.0
- mkdir -p ./_output/img/w10_Edge_15
- node test.js _config/w10_Edge_15 w10_Edge_15
- mkdir -p ./_output/img/w10_Firefox_54.0
- node test.js _config/w10_Firefox_54.0 w10_Firefox_54.0
- mkdir -p ./_output/img/w10_IE_11.0
- node test.js _config/w10_IE_11.0 w10_IE_11.0
- mkdir -p ./_output/img/Android_SamsungGalaxyS5
- node test.js _config/Android_SamsungGalaxyS5 Android_SamsungGalaxyS5
- mkdir -p ./_output/img/iOS_iPhone6SPlus
- node test.js _config/iOS_iPhone6SPlus iOS_iPhone6SPlus
- cd ./_output
- git init
- git remote add origin https://${GitHubKEY}@github.com/${GitHubRepoBrowserstack}.git
- cp base.md OSX_Safari_10.0.md
- sed -i "s/{platfrom_browser_name}/OSX Safari 10.0/g" OSX_Safari_10.0.md
- sed -i "s/{platfrom_browser}/OSX_Safari_10.0/g" OSX_Safari_10.0.md
- cp base.md w10_chrome_60.0.md
- sed -i "s/{platfrom_browser_name}/Windows10 Chrome 60.0/g" w10_chrome_60.0.md
- sed -i "s/{platfrom_browser}/w10_chrome_60.0/g" w10_chrome_60.0.md
- cp base.md w10_Edge_15.md
- sed -i "s/{platfrom_browser_name}/Windows10 Edge 15/g" w10_Edge_15.md
- sed -i "s/{platfrom_browser}/w10_Edge_15/g" w10_Edge_15.md
- cp base.md w10_Firefox_54.0.md
- sed -i "s/{platfrom_browser_name}/Windows10 Firefox 54/g" w10_Firefox_54.0.md
- sed -i "s/{platfrom_browser}/w10_Firefox_54.0/g" w10_Firefox_54.0.md
- cp base.md w10_IE_11.0.md
- sed -i "s/{platfrom_browser_name}/Windows10 IE 11.0/g" w10_IE_11.0.md
- sed -i "s/{platfrom_browser}/w10_IE_11.0/g" w10_IE_11.0.md
- cp base.md Android_SamsungGalaxyS5.md
- sed -i "s/{platfrom_browser_name}/Android Android Samsung Galaxy S5/g" Android_SamsungGalaxyS5.md
- sed -i "s/{platfrom_browser}/Android_SamsungGalaxyS5/g" Android_SamsungGalaxyS5.md
- cp base.md iOS_iPhone6SPlus.md
- sed -i "s/{platfrom_browser_name}/iPhone 6S Plus/g" iOS_iPhone6SPlus.md
- sed -i "s/{platfrom_browser}/iOS_iPhone6SPlus/g" iOS_iPhone6SPlus.md
- rm base.md
- git add --all .
- git commit -m "Travis Auto Generate for Material Theme"
- git push --quiet --force https://${GitHubKEY}@github.com/${GitHubRepoBrowserstack}.git
notifications:
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## General 概括

[![Version](https://img.shields.io/badge/version-1.4.0-green.svg?style=flat-square)]()
[![Version](https://img.shields.io/badge/version-1.5.0-green.svg?style=flat-square)]()
[![Author](https://img.shields.io/badge/author-Viosey-blue.svg?style=flat-square)](https://viosey.com)

[![Hexo](https://img.shields.io/badge/hexo-3.0+-green.svg?style=flat-square)](https://hexo.io)
Expand Down
99 changes: 86 additions & 13 deletions _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ img:
# Custom Fonts
# family: the font-family which will be used in the theme
# host: uri of fonts host.
# Available value of "host": google | baomitu | ustc | custom
# Available value of "host": google | baomitu | ustc | custom | catnet
# When you configured 'use' as 'custom', you should fill in the value of 'custom_font_host', which should be a mirror of google fonts.
# If you have setup your custom font-family, don't forget to add style tag with @font-face or link.tag with font css to /source/data/head.yml as custom code, to load custom font files.
fonts:
family: Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif
use: google
Expand All @@ -97,6 +99,12 @@ card_elevation: 2
# For example, if you set it as 2015, then footer will show '© 2015 - 2017'
copyright_since:

# Footer Text
# You can specify the text you want to show in footer, HTML tag is supported.
# For example, you can setup ICP license number as:
# '<a href="http://www.miitbeian.gov.cn" rel="nofollow">某ICP备xxxxxxxx号-x</a>'
footer_text:

# Qrcode for redirect at other device
# use: choose which method to generate the qrcode for each posts.
# Available value of "use": plugin | online
Expand All @@ -106,6 +114,40 @@ qrcode:
enable: false
use: plugin

# Code highlight
# Available value for `prettify` or `hanabi`: true | false
# You can only enable one of them to avoid issues. Also you need to check highlight option in _config.yml. Make sure that default hexo built in highlight plugin is disabled.
# highlight:
# enable: false
#
# Prettify
# theme value:
# theme-name # /vendors/prettify/themes/[theme-name].css
prettify:
enable: false
theme: "vibrant-ink" # default value: "vibrant-ink" # theme-name without '.css'

# Hanabi
# hanabi © egoist, Released under the MIT License
# https://github.com/egoist/hanabi
#
# line_number: [true/false] # Show line number for code block
# includeDefaultColors: [true/false] # Use default hanabi colors
# customColors: # This value accept a string or am array to setting for hanabi colors.
# # If `includeDefaultColors` is true, this will append colors to the color pool
# # If `includeDefaultColors` is false, this will instead default color pool
hanabi:
enable: false
line_number: true
includeDefaultColors: true
customColors:

# Post License
# You can specify the text you want to show in the end of your posts and pages, HTML tag is supported.
# For example, you can setup a CC license as:
# 'This blog is under a <a href="/creativecommons.html" target="_blank">CC BY-NC-SA 3.0 Unported License</a>'
# You can also use Front-Matter `license` to override this setting.
license:

# ---------------------------------------------------------------
# Menu Settings
Expand All @@ -132,6 +174,7 @@ sns:
zhihu:
bilibili:
telegram:
v2ex:

# SNS Share Switch
sns_share:
Expand Down Expand Up @@ -181,23 +224,24 @@ sidebar:
# Integrated Services
# ---------------------------------------------------------------

# MaterialCDN
# When you set 'use' as true, the needed css, js, font file will have a new src.
# The new src will have the base domain you configured in 'base'.
materialcdn:
use:
base:

# Comment Systems
# Available value of "use":
# disqus | disqus_click | changyan | 163gentie
# disqus | disqus_click | changyan | livere | gitment | valine
# If you want to use gitment,you should get the client_id and client_secret form https://github.com/settings/applications/new
# If you want to use valine,you should get the app_id and app_key form https://leancloud.cn ,more setting please see https://github.com/xCss/Valine
comment:
use:
shortname: # duoshuo or disqus shortname
changyan_appid:
changyan_conf:
changyan_thread_key_type: path
gentie_productKey:
livere_data_uid:
gitment_repo: # git repo of the hexo
gitment_owner: # git repo's owner
gitment_client_id: # github app client id
gitment_client_secret : # github app client secret
valine_leancloud_appId: # leancloud application app id
valine_leancloud_appKey: # leancloud application app key

# Search Systems
# Available value:
Expand All @@ -210,8 +254,9 @@ search:
# Available value:
# baidu | google | cnzz
analytics:
use:
site_id:
google_site_id:
baidu_site_id:
cnzz_site_id:

# Leancloud Views
leancloud:
Expand All @@ -225,4 +270,32 @@ busuanzi:
enable: false
all_site_uv: false
post_pv: false
busuanzi_pure_mini_js: "https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"
busuanzi_pure_mini_js: "https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"

# Files Vendors
# Set a CDN for the files src you want to customize. The url should with protocol.
# Default(empty) will load the files from the origin server.
vendors:
# MaterialCDN
# You can load theme unique files from your private cdn or oss.
# The new src will have the base domain you configured below.
# For example
# materialcdn: https://cdn.jsdelivr.net/npm/hexo-material@1.4.0/source
materialcdn:

# Third party library
# You can load these files from public cdn.
# For example
# jquery: https://cdn.bootcss.com/jquery/2.2.1/jquery.js
# jQuery 2.2.0
jquery:
# nprogress 0.2.0
nprogress:
# FontAwesome 4.5.0
fontawesome:
# MathJax 2.7.0-2.7.1
mathjax:
# Prettify r298 (only prettify.js)
prettify:
# Material Icons 3.0.1
material_icons:
1 change: 1 addition & 0 deletions languages/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "أحدث"
qrcode: "اقرأ هذا المقال على جهاز آخر"
comments_load_button: "قراءة تعليقات 「تأكد !disq.us & disquscdn.com & disqus.com يمكن تحميل」"
permalink: " هذا الرابط "
share:
article_rss: "مقالات RSS"
comment_rss: "تعليقات RSS"
Expand Down
1 change: 1 addition & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "Newer"
qrcode: "Read this article on other devices"
comments_load_button: "Read Comments (Make sure disq.us, disquscdn.com and disqus.com can load properly)"
permalink: "Link to this article: "
share:
article_rss: "Article RSS"
comment_rss: "Comment RSS"
Expand Down
1 change: 1 addition & 0 deletions languages/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "Más nuevo"
qrcode: "Lea este artículo en otro dispositivo"
comments_load_button: "Leer comentarios 「Asegúrese de que 'disq.us & disquscdn.com & disqus.com' se puede cargar」"
permalink: "Link to this article: "
share:
article_rss: "Artículo RSS"
comment_rss: "Comentario RSS"
Expand Down
1 change: 1 addition & 0 deletions languages/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ post:
newer: "Récent"
qrcode: "Lire cet article depuis un autre appareil"
comments_load_button: "Lire les commentaires (Assurez-vous que disq.us, disquscdn.com et disqus.com peuvent être chargés)"
permalink: "ce lien: "
share:
article_rss: "Flux RSS des articles"
comment_rss: "Flux RSS des commentaires"
Expand Down
5 changes: 3 additions & 2 deletions languages/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ post:
newer: "新しい"
qrcode: "他のデバイスでこの記事を読む"
comments_load_button: "論評を読む「 あなたは disqus & disquscdn.com & disqus.com をロードできることを確認します」"
permalink: "このリンク:"
share:
article_rss: "記事 RSS"
comment_rss: "論評 RSS"
toTwitter: "Twitter での共有"
toFacebook: "Share to Facebook"
toFacebook: "Facebook での共有"
toLinkedIn: "LinkedIn での共有"
toTelegram: "Telegram での共有"
toGplus: "Google+ での共有"
toWeibo: "Weibo での共有"
toQQ: "Share to QQ"
toQQ: "QQ での共有"
title:
category: "カテゴリー"
tag: "ラベル"
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ post:
comments_load_button: "阅读评论(请确保 disqus 可以正常加载)"
comments_fully_load_button: "加载完整评论(请确保 disqus 可以正常加载)"
comments_proxy_load_button: "加载评论基本模式"
permalink: "本文链接:"
share:
article_rss: "文章 RSS"
comment_rss: "评论 RSS"
Expand Down
3 changes: 2 additions & 1 deletion languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ post:
older: "舊篇"
newer: "新篇"
qrcode: "在其他設備中閱讀本文章"
comments_load_button: "閱讀評論 「請確認 disq.us & disquscdn.com & disqus.com 可正常載入」"
comments_load_button: "閱讀評論 「請確認 disq.us & disquscdn.com & disqus.com 可正常載入」"
permalink: "本文鏈接:"
share:
article_rss: "文章 RSS"
comment_rss: "評論 RSS"
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/Isolation-post_entry.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- Post Header Info -->
<div class="post_entry-header_info without-thumbnail">
<!-- Author Avatar & Name -->
<img src="<%= theme.img.avatar %>" class="avatar-img" width="44px" height="44px" alt="<%= config.author %>'s avatar">
<img src="<%= url_for(theme.img.avatar) %>" class="avatar-img" width="44px" height="44px" alt="<%= config.author %>'s avatar">
<span class="name-span"><%= config.author %></span>
</div>
Expand All @@ -14,7 +14,7 @@
<!-- Post Header Info -->
<div class="post_entry-header_info with-thumbnail">
<!-- Author Avatar & Name -->
<img src="<%= theme.img.avatar %>" class="avatar-img" width="44px" height="44px" alt="<%= config.author %>'s avatar">
<img src="<%= url_for(theme.img.avatar) %>" class="avatar-img" width="44px" height="44px" alt="<%= config.author %>'s avatar">
<span class="name-span"><%= config.author %></span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partial/Paradox-post-info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- Author Avatar -->
<div id="author-avatar">
<img src="<%- theme.img.avatar %>" width="44px" height="44px" alt="Author Avatar"/>
<img src="<%- url_for(theme.img.avatar) %>" width="44px" height="44px" alt="Author Avatar"/>
</div>
<!-- Author Name & Date -->
<div>
Expand All @@ -26,7 +26,7 @@
<% } %>

<!-- Tags (bookmark) -->
<% if(page.notag !== true) { %>
<% if (page.tags && page.tags.length) { %>
<button id="article-functions-viewtags-button" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon">
<i class="material-icons" role="presentation">bookmark</i>
<span class="visuallyhidden">bookmark</span>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/Paradox-post-thumbnail.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script type="text/ls-javascript" id="post-thumbnail-script">
var randomNum = Math.floor(Math.random() * <%= theme.thumbnail.random_amount %> + 1);
$('.post_thumbnail-random').attr('data-original', '<%= theme.img.random_thumbnail %>' + randomNum + '.png');
$('.post_thumbnail-random').attr('data-original', '<%= url_for(theme.img.random_thumbnail) %>' + randomNum + '.png');
$('.post_thumbnail-random').addClass('lazy');
</script>
2 changes: 1 addition & 1 deletion layout/_partial/Paradox-post_entry-thumbnail.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
randomNum = Math.floor(Math.random() * <%= theme.thumbnail.random_amount %> + 1);
locatePost.children('.post_thumbnail-random').attr('id', 'random_thumbnail-'+randomNum);
locatePost.children('.post_thumbnail-random').attr('data-original', '<%= theme.img.random_thumbnail %>' + randomNum + '.png');
locatePost.children('.post_thumbnail-random').attr('data-original', '<%= url_for(theme.img.random_thumbnail) %>' + randomNum + '.png');
$('.post_thumbnail-random').addClass('lazy');
locatePost = locatePost.next();
Expand Down

0 comments on commit 9b82078

Please sign in to comment.