chore(config): update config name

This commit is contained in:
Dillon 2020-02-17 02:32:52 +08:00
parent 5a1e0b5d31
commit dd78d80fef
7 changed files with 78 additions and 78 deletions

View file

@ -242,38 +242,38 @@ dateFormatToUse = "2006-01-02"
# mathematical formulas (KaTeX) # mathematical formulas (KaTeX)
[params.math] [params.math]
enable = true enable = true
block_left_delimiter = "" blockLeftDelimiter = ""
block_right_delimiter = "" blockRightDelimiter = ""
inline_left_delimiter = "$" inlineLeftDelimiter = "$"
inline_right_delimiter = "$" inlineRightDelimiter = "$"
# KaTeX extension copy_tex # KaTeX extension copy_tex
copy_tex = true copyTex = true
# KaTeX extension mhchem # KaTeX extension mhchem
mhchem = true mhchem = true
# CSS and JS Files CDN # CSS and JS Files CDN
[params.cdn] [params.cdn]
## for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">' ## for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
fontawesome_free_css = '' fontawesomeFreeCSS = ''
animate_css = '' animateCSS = ''
gitalk_css = '' gitalkCSS = ''
gitalk_js = '' gitalkJS = ''
valine_js = '' valineJS = ''
lazysizes_js = '' lazysizesJS = ''
smooth_scroll_js = '' smoothScrollJS = ''
katex_css = '' katexCSS = ''
katex_js = '' katexJS = ''
katex_auto_render_js = '' katexAutoRenderJS = ''
katex_copy_tex_css = '' katexCopyTexCSS = ''
katex_copy_tex_js = '' katexCopyTexJS = ''
katex_mhchem_js = '' katexMhchemJS = ''
mermaid_js = '' mermaidJS = ''
echarts_js = '' echartsJS = ''
echarts_macarons_js = '' echartsMacaronsJS = ''
typeit_js = '' typeitJS = ''
aplayer_css = '' aplayerCSS = ''
aplayer_js = '' aplayerJS = ''
meting_js = '' metingJS = ''
# site verification code for Google/Bing/Yandex/Pinterest/Baidu # site verification code for Google/Bing/Yandex/Pinterest/Baidu
[params.verification] [params.verification]

View file

@ -242,38 +242,38 @@ dateFormatToUse = "2006-01-02"
# 数学公式 (KaTeX https://katex.org/) # 数学公式 (KaTeX https://katex.org/)
[params.math] [params.math]
enable = true enable = true
block_left_delimiter = "" blockLeftDelimiter = ""
block_right_delimiter = "" blockRightDelimiter = ""
inline_left_delimiter = "$" inlineLeftDelimiter = "$"
inline_right_delimiter = "$" inlineRightDelimiter = "$"
# KaTeX 插件 copy_tex # KaTeX 插件 copy_tex
copy_tex = true copyTex = true
# KaTeX 插件 mhchem # KaTeX 插件 mhchem
mhchem = true mhchem = true
# CSS 和 JS 文件的 CDN 设置 # CSS 和 JS 文件的 CDN 设置
[params.cdn] [params.cdn]
## 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">' ## 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
fontawesome_free_css = '' fontawesomeFreeCSS = ''
animate_css = '' animateCSS = ''
gitalk_css = '' gitalkCSS = ''
gitalk_js = '' gitalkJS = ''
valine_js = '' valineJS = ''
lazysizes_js = '' lazysizesJS = ''
smooth_scroll_js = '' smoothScrollJS = ''
katex_css = '' katexCSS = ''
katex_js = '' katexJS = ''
katex_auto_render_js = '' katexAutoRenderJS = ''
katex_copy_tex_css = '' katexCopyTexCSS = ''
katex_copy_tex_js = '' katexCopyTexJS = ''
katex_mhchem_js = '' katexMhchemJS = ''
mermaid_js = '' mermaidJS = ''
echarts_js = '' echartsJS = ''
echarts_macarons_js = '' echartsMacaronsJS = ''
typeit_js = '' typeitJS = ''
aplayer_css = '' aplayerCSS = ''
aplayer_js = '' aplayerJS = ''
meting_js = '' metingJS = ''
# 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu # 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
[params.verification] [params.verification]

View file

@ -15,12 +15,12 @@
{{- if .Site.Params.comment.gitalk.owner -}} {{- if .Site.Params.comment.gitalk.owner -}}
{{- $gitalk := .Site.Params.comment.gitalk -}} {{- $gitalk := .Site.Params.comment.gitalk -}}
<div id="gitalk"></div> <div id="gitalk"></div>
{{- with $CDN.gitalk_css -}} {{- with $CDN.gitalkCSS -}}
{{- slice . | $.Scratch.Add "linkCDN" -}} {{- slice . | $.Scratch.Add "linkCDN" -}}
{{- else -}} {{- else -}}
{{- slice "css/lib/gitalk/gitalk.css" | .Scratch.Add "linkLocal" -}} {{- slice "css/lib/gitalk/gitalk.css" | .Scratch.Add "linkLocal" -}}
{{- end -}} {{- end -}}
{{- with $CDN.gitalk_js -}} {{- with $CDN.gitalkJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "css/lib/gitalk/gitalk.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "css/lib/gitalk/gitalk.min.js" | .Scratch.Add "scriptLocal" -}}
@ -50,7 +50,7 @@
{{- $valine := .Site.Params.comment.valine -}} {{- $valine := .Site.Params.comment.valine -}}
<div id="valine"></div> <div id="valine"></div>
{{- slice "css/lib/valine/dark.scss" | .Scratch.Add "linkLocal" -}} {{- slice "css/lib/valine/dark.scss" | .Scratch.Add "linkLocal" -}}
{{- with $CDN.valine_js -}} {{- with $CDN.valineJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/valine/Valine.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/valine/Valine.min.js" | .Scratch.Add "scriptLocal" -}}

View file

@ -30,7 +30,7 @@
<link rel="stylesheet" href="{{ $res.RelPermalink }}"> <link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- /* Font Awesome https://fontawesome.com/ */ -}} {{- /* Font Awesome https://fontawesome.com/ */ -}}
{{- with $CDN.fontawesome_free_css -}} {{- with $CDN.fontawesomeFreeCSS -}}
{{- . | safeHTML -}} {{- . | safeHTML -}}
{{- else -}} {{- else -}}
{{- $res := resources.Get "css/lib/fontawesome-free/all.min.css" -}} {{- $res := resources.Get "css/lib/fontawesome-free/all.min.css" -}}
@ -43,7 +43,7 @@
<link rel="stylesheet" href="{{ $res.RelPermalink }}"> <link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{- /* Animate.css https://github.com/daneden/animate.css */ -}} {{- /* Animate.css https://github.com/daneden/animate.css */ -}}
{{- with $CDN.animate_css -}} {{- with $CDN.animateCSS -}}
{{- . | safeHTML -}} {{- . | safeHTML -}}
{{- else -}} {{- else -}}
{{ $res := resources.Get "css/lib/animate/animate.min.css" -}} {{ $res := resources.Get "css/lib/animate/animate.min.css" -}}

View file

@ -6,14 +6,14 @@
{{- end -}} {{- end -}}
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}} {{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
{{- with $CDN.lazysizes_js -}} {{- with $CDN.lazysizesJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/lazysizes/lazysizes.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/lazysizes/lazysizes.min.js" | .Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- /* Smooth Scroll https://github.com/cferdinandi/smooth-scroll */ -}} {{- /* Smooth Scroll https://github.com/cferdinandi/smooth-scroll */ -}}
{{- with $CDN.smooth_scroll_js -}} {{- with $CDN.smoothScrollJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | .Scratch.Add "scriptLocal" -}}
@ -21,7 +21,7 @@
{{- /* TypeIt https://github.com/alexmacarthur/typeit */ -}} {{- /* TypeIt https://github.com/alexmacarthur/typeit */ -}}
{{- with .Scratch.Get "typeitMap" -}} {{- with .Scratch.Get "typeitMap" -}}
{{- with $CDN.typeit_js -}} {{- with $CDN.typeitJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/typeit/typeit.min.js" | $.Scratch.Add "scriptLocal" -}} {{- slice "js/lib/typeit/typeit.min.js" | $.Scratch.Add "scriptLocal" -}}
@ -36,36 +36,36 @@
{{- /* KaTeX https://github.com/KaTeX/KaTeX */ -}} {{- /* KaTeX https://github.com/KaTeX/KaTeX */ -}}
{{- if .Site.Params.math.enable | and (ne .Params.math false) -}} {{- if .Site.Params.math.enable | and (ne .Params.math false) -}}
{{- with $CDN.katex_css -}} {{- with $CDN.katexCSS -}}
{{- slice . | $.Scratch.Add "linkCDN" -}} {{- slice . | $.Scratch.Add "linkCDN" -}}
{{- else -}} {{- else -}}
{{- slice "css/lib/katex/katex.min.css" | .Scratch.Add "linkLocal" -}} {{- slice "css/lib/katex/katex.min.css" | .Scratch.Add "linkLocal" -}}
{{- end -}} {{- end -}}
{{- with $CDN.katex_js -}} {{- with $CDN.katexJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/katex/katex.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/katex/katex.min.js" | .Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- with $CDN.katex_auto_render_js -}} {{- with $CDN.katexAutoRenderJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/katex/auto-render.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/katex/auto-render.min.js" | .Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- $math := .Site.Params.math -}} {{- $math := .Site.Params.math -}}
{{- if $math.copy_tex -}} {{- if $math.copyTex -}}
{{- with $CDN.katex_copy_tex_css -}} {{- with $CDN.katexCopyTexCSS -}}
{{- slice . | $.Scratch.Add "linkCDN" -}} {{- slice . | $.Scratch.Add "linkCDN" -}}
{{- else -}} {{- else -}}
{{- slice "css/lib/katex/copy-tex.min.css" | .Scratch.Add "linkLocal" -}} {{- slice "css/lib/katex/copy-tex.min.css" | .Scratch.Add "linkLocal" -}}
{{- end -}} {{- end -}}
{{- with $CDN.katex_copy_tex_js -}} {{- with $CDN.katexCopyTexJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/katex/copy-tex.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/katex/copy-tex.min.js" | .Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if $math.mhchem -}} {{- if $math.mhchem -}}
{{- with $CDN.katex_mhchem_js -}} {{- with $CDN.katexMhchemJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/katex/mhchem.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/katex/mhchem.min.js" | .Scratch.Add "scriptLocal" -}}
@ -78,11 +78,11 @@
{ left: "$$", right: "$$", display: true }, { left: "$$", right: "$$", display: true },
{ left: "\\(", right: "\\)", display: false }, { left: "\\(", right: "\\)", display: false },
{ left: "\\[", right: "\\]", display: true }, { left: "\\[", right: "\\]", display: true },
{{- if and $math.block_left_delimiter $math.block_right_delimiter -}} {{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
{ left: "{{ $math.block_left_delimiter }}", right: "{{ $math.block_right_delimiter }}", display: true }, { left: "{{ $math.blockLeftDelimiter }}", right: "{{ $math.blockRightDelimiter }}", display: true },
{{- end -}} {{- end -}}
{{- if and $math.inline_left_delimiter $math.inline_right_delimiter -}} {{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}}
{ left: "{{ $math.inline_left_delimiter }}", right: "{{ $math.inline_right_delimiter }}", display: false }, { left: "{{ $math.inlineLeftDelimiter }}", right: "{{ $math.inlineRightDelimiter }}", display: false },
{{- end -}} {{- end -}}
] ]
}); });
@ -92,7 +92,7 @@
{{- /* mermaid https://github.com/knsv/mermaid */ -}} {{- /* mermaid https://github.com/knsv/mermaid */ -}}
{{- with .Scratch.Get "mermaidMap" -}} {{- with .Scratch.Get "mermaidMap" -}}
{{- with $CDN.mermaid_js -}} {{- with $CDN.mermaidJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}} {{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}}
@ -106,20 +106,20 @@
{{- /* Music */ -}} {{- /* Music */ -}}
{{- if .Scratch.Get "music" -}} {{- if .Scratch.Get "music" -}}
{{- /* APlayer https://github.com/MoePlayer/APlayer */ -}} {{- /* APlayer https://github.com/MoePlayer/APlayer */ -}}
{{- with $CDN.aplayer_css -}} {{- with $CDN.aplayerCSS -}}
{{- slice . | $.Scratch.Add "linkCDN" -}} {{- slice . | $.Scratch.Add "linkCDN" -}}
{{- else -}} {{- else -}}
{{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}} {{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}}
{{- end -}} {{- end -}}
{{- slice "css/lib/aplayer/dark.scss" | .Scratch.Add "linkLocal" -}} {{- slice "css/lib/aplayer/dark.scss" | .Scratch.Add "linkLocal" -}}
{{- with $CDN.aplayer_js -}} {{- with $CDN.aplayerJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/aplayer/APlayer.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/aplayer/APlayer.min.js" | .Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- /* MetingJS https://github.com/metowolf/MetingJS */ -}} {{- /* MetingJS https://github.com/metowolf/MetingJS */ -}}
{{- with $CDN.meting_js -}} {{- with $CDN.metingJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/meting/Meting.min.js" | .Scratch.Add "scriptLocal" -}} {{- slice "js/lib/meting/Meting.min.js" | .Scratch.Add "scriptLocal" -}}
@ -130,12 +130,12 @@
{{- if .Params.dev -}} {{- if .Params.dev -}}
{{- /* ECharts https://github.com/apache/incubator-echarts */ -}} {{- /* ECharts https://github.com/apache/incubator-echarts */ -}}
{{- with .Scratch.Get "echartsMap" -}} {{- with .Scratch.Get "echartsMap" -}}
{{- with $CDN.echarts_js -}} {{- with $CDN.echartsJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/echarts/echarts.min.js" | $.Scratch.Add "scriptLocal" -}} {{- slice "js/lib/echarts/echarts.min.js" | $.Scratch.Add "scriptLocal" -}}
{{- end -}} {{- end -}}
{{- with $CDN.echarts_macarons_js -}} {{- with $CDN.echartsMacaronsJS -}}
{{- slice . | $.Scratch.Add "scriptCDN" -}} {{- slice . | $.Scratch.Add "scriptCDN" -}}
{{- else -}} {{- else -}}
{{- slice "js/lib/echarts/macarons.js" | $.Scratch.Add "scriptLocal" -}} {{- slice "js/lib/echarts/macarons.js" | $.Scratch.Add "scriptLocal" -}}

View file

@ -18,8 +18,8 @@
}, },
"husky": { "husky": {
"hooks": { "hooks": {
"pre-commit": "npm run build && npm run copy", "pre-commit": "npm run build && npm run copy && git add .",
"pre-push": "npm run build && npm run copy" "pre-push": "npm run build && npm run copy && git add ."
} }
}, },
"repository": { "repository": {