Skip to content

Commit

Permalink
Merge branch 'dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryc127 committed Jan 30, 2021
2 parents 24cf0a1 + defb1c5 commit 823dc03
Show file tree
Hide file tree
Showing 68 changed files with 876 additions and 617 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: npm publish

on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39 changes: 25 additions & 14 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ avatar:
img:
effect: false

# Disable all banner image
disable_top_img: false

# The banner image of home page
index_img:

Expand Down Expand Up @@ -192,6 +195,14 @@ reward:
# link:
# text: alipay

# Post edit
# Easily browse and edit blog source code online.
post_edit:
enable: false
# url: https://github.com/user-name/repo-name/edit/branch-name/subdirectory-name/
# For example: https://github.com/jerryc127/butterfly.js.org/edit/main/source/
url:

# Related Articles
related_post:
enable: true
Expand All @@ -201,6 +212,13 @@ related_post:
# figcaption (圖片描述文字)
photofigcaption: false

# post_pagination (分頁)
# value: 1 || 2 || false
# 1: The 'next post' will link to old post
# 2: The 'next post' will link to new post
# false: disable pagination
post_pagination: 1

# anchor
# when you scroll in post, the URL will update according to header id.
anchor: false
Expand Down Expand Up @@ -248,7 +266,8 @@ comments:
# lazyload: The comment system will be load when comment element enters the browser's viewport.
# If you set it to true, the comment count will be invalid
lazyload: false
count: false # Display comment count in top_img
count: false # Display comment count in post's top_img
card_post_count: false # Display comment count in Home Page

# disqus
# https://disqus.com/
Expand Down Expand Up @@ -601,10 +620,10 @@ subtitle:
loop: true
# source調用第三方服務
# source: false 關閉調用
# source: 1 調用搏天api的隨機語錄(簡體) https://api.btstu.cn/
# source: 2 調用一言網的一句話(簡體) https://hitokoto.cn/
# source: 3 調用一句網(簡體) http://yijuzhan.com/
# source: 4 調用今日詩詞(簡體) https://www.jinrishici.com/
# source: 1 調用搏天api的隨機語錄(簡體)
# source: 2 調用一言網的一句話(簡體)
# source: 3 調用一句網(簡體)
# source: 4 調用今日詩詞(簡體)
# subtitle 會先顯示 source , 再顯示 sub 的內容
source: false
# 如果有英文逗號' , ',請使用轉義字元 ,
Expand Down Expand Up @@ -682,6 +701,7 @@ newest_comments:
enable: false
sort_order: # Don't modify the setting unless you know how it works
limit: 6
storage: 10 # unit: mins, save data to localStorage
avatar: true
# You can only choose one, or neither
valine: false
Expand Down Expand Up @@ -799,9 +819,6 @@ snackbar:
bg_light: '#49b1f5' # The background color of Toast Notification in light mode
bg_dark: '#121212' # The background color of Toast Notification in dark mode

# Baidu Push (百度推送)
baidu_push: false

# https://instant.page/
# prefetch (預加載)
instantpage: false
Expand Down Expand Up @@ -829,16 +846,10 @@ lazyload:
# favicon_16_16: /image/pwa/16.png
# mask_icon: /image/pwa/safari-pinned-tab.svg

# Disable Baidu transformation on mobile devices (禁止百度轉碼)
disable_baidu_transformation: true

# Open graph meta tags
# https://developers.facebook.com/docs/sharing/webmasters/
Open_Graph_meta: true

# Caches the contents in a fragment, speed up the generation (開啟hexo自帶的緩存,加快生成速度)
fragment_cache: true

# Add the vendor prefixes to ensure compatibility
css_prefix: true

Expand Down
6 changes: 6 additions & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ page:
category: Category
archives: Archives

card_post_count: comments

sticky: Sticky
no_title: No title

Expand All @@ -30,6 +32,7 @@ post:
copyright_notice: Copyright Notice
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
recommend: Related Articles
edit: Edited on

search: Search
algolia_search:
Expand Down Expand Up @@ -74,6 +77,9 @@ aside:
loading_text: loading...
error: Unable to get the data, please make sure the settings are correct.
zero: No Comment
image: image
link: link
code: code
card_toc: Catalog

date_suffix:
Expand Down
6 changes: 6 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ page:
category: Category
archives: Archives

card_post_count: comments

sticky: Sticky
no_title: No title

Expand All @@ -30,6 +32,7 @@ post:
copyright_notice: Copyright Notice
copyright_content: 'All articles in this blog are licensed under <a href="%s">%s</a> unless stating additionally.'
recommend: Related Articles
edit: Edited on

search: Search
algolia_search:
Expand Down Expand Up @@ -74,6 +77,9 @@ aside:
loading_text: loading...
error: Unable to get the data, please make sure the settings are correct.
zero: No Comment
image: image
link: link
code: code
card_toc: Catalog

date_suffix:
Expand Down
6 changes: 6 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ page:
category: 分类
archives: 归档

card_post_count: 条评论

sticky: 置顶
no_title: 无题

Expand All @@ -31,6 +33,7 @@ post:
copyright_content: '本博客所有文章除特别声明外,均采用
<a href="%s" target="_blank">%s</a> 许可协议。转载请注明来自 <a href="%s" target="_blank">%s</a>!'
recommend: 相关推荐
edit: 编辑

search: 搜索
algolia_search:
Expand Down Expand Up @@ -75,6 +78,9 @@ aside:
loading_text: 正在加载中...
error: 无法获取评论,请确认相关配置是否正确
zero: 没有评论
image: 图片
link: 链接
code: 代码
card_toc: 目录

date_suffix:
Expand Down
10 changes: 8 additions & 2 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ page:
category: 分類
archives: 歸檔

card_post_count: 條評論

sticky: 置頂
no_title: 無題

post:
created: 發表於
updated: 更新於
wordcount: 字數總計
min2read: 閲讀時長
min2read: 閱讀時長
min2read_unit: 分鐘
page_pv: 閱讀量
comments: 評論數
Expand All @@ -31,6 +33,7 @@ post:
copyright_content: '本部落格所有文章除特別聲明外,均採用
<a href="%s" target="_blank">%s</a> 許可協議。轉載請註明來自 <a href="%s" target="_blank">%s</a>!'
recommend: 相關推薦
edit: 編輯

search: 搜尋
algolia_search:
Expand Down Expand Up @@ -72,9 +75,12 @@ aside:
more_button: 檢視更多
card_newest_comments:
headline: 最新評論
loading_text: 正在加載中...
loading_text: 正在載入中...
error: 無法獲取評論,請確認相關配置是否正確
zero: 沒有評論
image: 圖片
link: 連結
code: 代碼
card_toc: 目錄

date_suffix:
Expand Down
4 changes: 2 additions & 2 deletions layout/404.pug
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
- var top_img = theme.error_404.background || theme.default_top_img
- var bg_img = `background-image: url(${url_for(top_img)})`
- var bg_img = `background-image: url('${url_for(top_img)}')`

doctype html
html(lang=config.language data-theme=theme.display_mode)
head
include includes/head.pug
body
if theme.preloader
!=partial('includes/loading/loading', {}, {cache:theme.fragment_cache})
!=partial('includes/loading/loading', {}, {cache: true})

if theme.fireworks && theme.fireworks.enable
canvas.fireworks
Expand Down
2 changes: 1 addition & 1 deletion layout/category.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ block content
#category
.article-sort-title= _p('page.category') + ' - ' + page.category
+articleSort(page.posts)
include includes/pagination.pug
include includes/pagination.pug
36 changes: 18 additions & 18 deletions layout/includes/additional-js.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ div
script(src=url_for(theme.CDN.utils))
script(src=url_for(theme.CDN.main))

if theme.translate && theme.translate.enable
if theme.translate.enable
script(src=url_for(theme.CDN.translate))

if theme.medium_zoom
Expand All @@ -14,11 +14,11 @@ div
if theme.lazyload.enable
script(src=url_for(theme.CDN.lazyload))

if (theme.snackbar && theme.snackbar.enable)
if theme.snackbar.enable
script(src=url_for(theme.CDN.snackbar))

if theme.pangu && theme.pangu.enable
!=partial('includes/third-party/pangu.pug', {}, {cache:theme.fragment_cache})
if theme.pangu.enable
!=partial('includes/third-party/pangu.pug', {}, {cache: true})

//- search
if theme.algolia_search.enable
Expand All @@ -27,33 +27,33 @@ div
script(src=url_for(theme.CDN.local_search))

if theme.preloader
!=partial('includes/loading/loading-js', {}, {cache:theme.fragment_cache})
!=partial('includes/loading/loading-js', {}, {cache: true})

.js-pjax
if theme.subtitle.enable && is_home() && theme.index_img !== false
if needLoadCountJs
!=partial('includes/third-party/card-post-count/index', {}, {cache: true})

if loadSubJs
include ./third-party/subtitle.pug

include ./third-party/math/index.pug

if commentsJsLoad
include ./third-party/comments/js.pug

if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async src=url_for(theme.CDN.busuanzi))

!=partial('includes/third-party/prismjs', {}, {cache:theme.fragment_cache})
!=partial('includes/third-party/prismjs', {}, {cache: true})

if theme.aside.enable && theme.newest_comments.enable
if theme.pjax.enable
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
!=partial('includes/third-party/newest-comments/index', {}, {cache: true})
else if (!is_post() && page.aside !== false)
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
!=partial('includes/third-party/newest-comments/index', {}, {cache: true})

!=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)})

!=partial('includes/third-party/effect', {}, {cache:theme.fragment_cache})
!=partial('includes/third-party/effect', {}, {cache: true})

!=partial('includes/third-party/chat/index', {}, {cache:theme.fragment_cache})
!=partial('includes/third-party/chat/index', {}, {cache: true})

if theme.aplayerInject && theme.aplayerInject.enable
if theme.pjax.enable || theme.aplayerInject.per_page
Expand All @@ -62,7 +62,7 @@ div
include ./third-party/aplayer.pug

if theme.pjax.enable
!=partial('includes/third-party/pjax', {}, {cache:theme.fragment_cache})

!=partial('includes/third-party/baidu_push', {}, {cache:theme.fragment_cache})

!=partial('includes/third-party/pjax', {}, {cache: true})
if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv
script(async data-pjax src=url_for(theme.CDN.busuanzi))
Loading

0 comments on commit 823dc03

Please sign in to comment.