Skip to content

Commit

Permalink
🐎 ci(Actions): 全部使用Node16版本脚本以避免警告
Browse files Browse the repository at this point in the history
  • Loading branch information
CCKNBC committed Oct 22, 2022
1 parent dc031e4 commit 630ceaf
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 54 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/Baidu Sitemap Push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
retain_days: 30
keep_minimum_runs: 6

- name: Telegram Notification
if: cancelled() == false
uses: xinthink/action-telegram@v1.1
with:
botToken: ${{ secrets.TG_BOT_TOKEN }} #use bot @BotFather
chatId: ${{ secrets.TG_CHAT_ID }} #use bot @userinfobot
jobStatus: ${{ job.status }}
skipSuccess: true
# - name: Telegram Notification
# if: cancelled() == false
# uses: xinthink/action-telegram@v1.1
# with:
# botToken: ${{ secrets.TG_BOT_TOKEN }} #use bot @BotFather
# chatId: ${{ secrets.TG_CHAT_ID }} #use bot @userinfobot
# jobStatus: ${{ job.status }}
# skipSuccess: true
15 changes: 8 additions & 7 deletions .github/workflows/Deploy Hexo Public To Pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ jobs:
check-latest: true
cache: "npm"

# - name: Catch Dependencies
# uses: actions/cache@main
# id: cache-dependencies
# with:
# path: node_modules
# key: ${{runner.OS}}-${{hashFiles('**/package-lock.json')}}
- name: Catch Dependencies
uses: actions/cache@main
id: cache-dependencies
with:
path: node_modules
key: ${{runner.OS}}-${{hashFiles('**/package-lock.json')}}

- name: Install Dependencies
if: steps.setup-node.outputs.cache-hit != 'true'
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
npm ci
- name: Generate
run: |
npm i -g hexo-cli yuque-hexo
git clone -b posts git@github.com:ccknbc-actions/blog-butterfly.git source/_posts
npm run github
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/Deploy Yuque-Hexo Public To Pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
run: |
npm i -g hexo-cli yuque-hexo
npm run yuque
# npm i -g hexo-cli yuque-hexo
# mkdir -p yuque
# yuque-hexo sync

Expand All @@ -80,14 +81,13 @@ jobs:
retention-days: 90

- name: Deploy Markdown Posts To Branch Posts
uses: peaceiris/actions-gh-pages@v3
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: posts
publish_dir: ./source/_posts
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
full_commit_message: ${{ github.event.head_commit.message }}
branch: posts
folder: ./source/_posts/语雀/
git-config-name: "github-actions[bot]"
git-config-email: "github-actions[bot]@users.noreply.github.com"
commit-message: ${{ github.event.head_commit.message }}

- name: Deploy Hexo Public To Pages
run: |
Expand Down
11 changes: 10 additions & 1 deletion themes/butterfly/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,16 @@ lazyload:

# Open graph meta tags
# https://developers.facebook.com/docs/sharing/webmasters/
Open_Graph_meta: true
Open_Graph_meta:
enable: true
option:
# twitter_card:
# twitter_image:
# twitter_id:
# twitter_site:
# google_plus:
# fb_admins:
# fb_app_id:

# Add the vendor prefixes to ensure compatibility
css_prefix: true
Expand Down
8 changes: 0 additions & 8 deletions themes/butterfly/layout/includes/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@

- var isSubtitle = config.subtitle ? ' - ' + config.subtitle : ''
- var tabTitle = is_home() || !pageTitle ? config.title + isSubtitle : pageTitle + ' | ' + config.title

- var pageKeywords
- if (page.keywords) pageKeywords = Array.isArray(page.keywords) ? (page.keywords).join(',') : ([]).join(',') || page.keywords
- else if (page.tags && page.tags.length) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',')
- else pageKeywords = Array.isArray(config.keywords) ? (config.keywords).join(','): ([]).join(',') || config.keywords
- var pageAuthor = config.email ? config.author + ',' + config.email : config.author
- var pageCopyright = config.copyright || config.author
- var themeColorLight = theme.theme_color && theme.theme_color.enable && theme.theme_color.meta_theme_color_light || '#ffffff'
Expand All @@ -22,13 +17,10 @@ meta(charset='UTF-8')
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no")
title= tabTitle
if pageKeywords
meta(name="keywords" content=pageKeywords)
meta(name="author" content=pageAuthor)
meta(name="copyright" content=pageCopyright)
meta(name ="format-detection" content="telephone=no")
meta(name="theme-color" content=themeColor)
meta(name="follow.it-verification-code" content="pNLxY9u1rgSk0w57Kk39")
if is_post()
meta(name="referrer" content="no-referrer")

Expand Down
18 changes: 10 additions & 8 deletions themes/butterfly/layout/includes/head/Open_Graph.pug
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
if theme.Open_Graph_meta
- let contentType = is_post() ? 'article' : 'website'
- let metaImage = (page.cover || theme.avatar.img) ? full_url_for(page.cover || theme.avatar.img) : ''
- let fb_appId = theme.facebook_comments.app_id || ''
- let fb_admins = theme.facebook_comments.user_id || ''

!= open_graph({type: contentType, image: metaImage, fb_admins: fb_admins, fb_app_id: fb_appId})

if theme.Open_Graph_meta.enable
-
let ogOption = Object.assign({
type: is_post() ? 'article' : 'website',
image: (page.cover || theme.avatar.img) ? full_url_for(page.cover || theme.avatar.img) : '',
fb_admins: theme.facebook_comments.user_id || '',
fb_app_id: theme.facebook_comments.app_id || '',
}, theme.Open_Graph_meta.option)
-
!= open_graph(ogOption)
else
meta(name="description" content=page_description())

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- const fbSDKVer = 'v14.0'
- const fbSDKVer = 'v15.0'
- const fbSDK = theme.messenger.enable ? `https://connect.facebook.net/${theme.facebook_comments.lang}/sdk/xfbml.customerchat.js#xfbml=1&version=${fbSDKVer}` : `https://connect.facebook.net/${theme.facebook_comments.lang}/sdk.js#xfbml=1&version=${fbSDKVer}`

script.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ script.
window.fbAsyncInit = function() {
FB.init({
xfbml: true,
version: 'v14.0'
version: 'v15.0'
});
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- const fbSDKVer = 'v14.0'
- const fbSDKVer = 'v15.0'
- const fbSDK = theme.messenger.enable ? `https://connect.facebook.net/${theme.facebook_comments.lang}/sdk/xfbml.customerchat.js#xfbml=1&version=${fbSDKVer}` : `https://connect.facebook.net/${theme.facebook_comments.lang}/sdk.js#xfbml=1&version=${fbSDKVer}`

script.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ script.
function loadOtherComment () {
loadWaline()
}
}
}

//- script(async data-auto-insert="markdown-embed" data-palette="green" data-sibling=".wl-actions" data-url="https://img.gejiba.com/upload" src="//img.gejiba.com/sdk/pup.js")
2 changes: 1 addition & 1 deletion themes/butterfly/layout/includes/third-party/pjax.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if theme.pjax.exclude

- let choose = theme.comments.use
if choose
if theme.Open_Graph_meta && (choose.includes('Livere') || choose.includes('Utterances') || choose.includes('Giscus'))
if theme.Open_Graph_meta.enable && (choose.includes('Livere') || choose.includes('Utterances') || choose.includes('Giscus'))
- pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
if choose.includes('Utterances') || choose.includes('Giscus')
- pjaxSelectors.unshift('link[rel="canonical"]')
Expand Down
2 changes: 1 addition & 1 deletion themes/butterfly/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-butterfly",
"version": "4.5.0-b3",
"version": "4.5.0",
"description": "A Simple and Card UI Design theme for Hexo",
"main": "package.json",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions themes/butterfly/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ algolia_search_v4:
instantsearch_v4:
name: instantsearch.js
file: dist/instantsearch.production.min.js
version: 4.46.3
version: 4.48.1
pjax:
name: pjax
file: pjax.min.js
Expand Down Expand Up @@ -42,7 +42,7 @@ waline_js:
name: '@waline/client'
file: dist/waline.js
other_name: waline
version: 2.11.3
version: 2.13.0
waline_css:
name: '@waline/client'
file: dist/waline-meta.css
Expand All @@ -52,7 +52,7 @@ waline_meta_css:
name: '@waline/client'
file: dist/waline.css
other_name: waline
version: 2.11.3
version: 2.13.0
sharejs:
name: butterfly-extsrc
file: sharejs/dist/js/social-share.min.js
Expand Down
7 changes: 2 additions & 5 deletions themes/butterfly/source/css/_layout/third-party.styl
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@
--waline-theme-color: $button-bg
--waline-active-color: $button-hover-color

.vuser
transition: all .5s

&:hover
transform: rotate(360deg)
.wl-comment-actions > button:not(last-child)
padding-right: 4px

if hexo-config('valine.bg')
#vcomment
Expand Down
2 changes: 1 addition & 1 deletion themes/butterfly/source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ document.addEventListener('DOMContentLoaded', function () {
// handle some cases
typeof utterancesTheme === 'function' && utterancesTheme()
typeof changeGiscusTheme === 'function' && changeGiscusTheme()
typeof FB === 'object' && window.loadFBComment()
typeof FB === 'object' && window.loadFBComment && window.loadFBComment()
typeof runMermaid === 'function' && window.runMermaid()
},
showOrHideBtn: (e) => { // rightside 點擊設置 按鈕 展開
Expand Down

0 comments on commit 630ceaf

Please sign in to comment.