refactor(param): camelcase for parameter names

BREAKING CHANGE: Rename parameter names.

    | origin   | now      |
    | :------: |:--------:|
    | fancyboxJ**s** | fancyboxJ**S** |
    | fancyboxC**ss**| fancyboxC**SS**|
    | baidu_push | baidu**P**ush |
    | baidu_analytics | baidu**A**nalytics |
    | baidu_verification | baidu**V**erification |
    | google_verification | google**V**erification |
This commit is contained in:
olOwOlo 2018-07-06 22:50:37 +08:00
parent 90a17f8540
commit fcb48d9be0
No known key found for this signature in database
GPG key ID: 456394B6E7A15EA6
4 changed files with 39 additions and 19 deletions

View file

@ -1,3 +1,20 @@
<a name="4.0.0"></a>
# 4.0.0 (WIP)
### BREAKING CHANGES
- Rename params
| origin | now |
| :------: |:--------:|
| fancyboxJ**s** | fancyboxJ**S** |
| fancyboxC**ss**| fancyboxC**SS**|
| baidu_push | baidu**P**ush |
| baidu_analytics | baidu**A**nalytics |
| baidu_verification | baidu**V**erification |
| google_verification | google**V**erification |
<a name="3.2.0"></a> <a name="3.2.0"></a>
# [3.2.0](https://github.com/olOwOlo/hugo-theme-even/compare/v3.1.1...v3.2.0) (2018-07-06) # [3.2.0](https://github.com/olOwOlo/hugo-theme-even/compare/v3.1.1...v3.2.0) (2018-07-06)

View file

@ -2,11 +2,11 @@ baseURL = "http://localhost:1313/"
languageCode = "en" languageCode = "en"
defaultContentLanguage = "en" # en / zh-cn / ... (This field determines which i18n file to use) defaultContentLanguage = "en" # en / zh-cn / ... (This field determines which i18n file to use)
title = "Even - A super concise theme for Hugo" title = "Even - A super concise theme for Hugo"
preserveTaxonomyNames = true
enableRobotsTXT = true enableRobotsTXT = true
enableEmoji = true enableEmoji = true
theme = "even" theme = "even"
preserveTaxonomyNames = true
hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文 hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文
paginate = 5 # 首页每页显示的文章数 paginate = 5 # 首页每页显示的文章数
disqusShortname = "" # disqus_shortname disqusShortname = "" # disqus_shortname
@ -83,11 +83,13 @@ copyright = "" # default: author.name ↓ # 默认为下面配
changyanAppid = "" # Changyan app id # 畅言 changyanAppid = "" # Changyan app id # 畅言
changyanAppkey = "" # Changyan app key changyanAppkey = "" # Changyan app key
livereUID = "" # LiveRe UID # 来必力 livereUID = "" # LiveRe UID # 来必力
baidu_push = false # baidu push # 百度
baidu_analytics = "" # Baidu Analytics baiduPush = false # baidu push # 百度
baidu_verification = "" # Baidu Verification baiduAnalytics = "" # Baidu Analytics
google_verification = "" # Google_Verification # 谷歌 baiduVerification = "" # Baidu Verification
googleVerification = "" # Google Verification # 谷歌
# Link custom CSS and JS assets # Link custom CSS and JS assets
# (relative to /static/css and /static/js respectively) # (relative to /static/css and /static/js respectively)
@ -98,17 +100,18 @@ copyright = "" # default: author.name ↓ # 默认为下面配
enable = false enable = false
jquery = '<script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>' jquery = '<script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>'
slideout = '<script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>' slideout = '<script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>'
fancyboxJs = '<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>' fancyboxJS = '<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>'
fancyboxCss = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">' fancyboxCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">'
gitmentJS = '<script src="https://cdn.jsdelivr.net/npm/gitment@0.0.3/dist/gitment.browser.min.js" crossorigin="anonymous"></script>'
gitmentCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitment@0.0.3/style/default.min.css" crossorigin="anonymous">'
gitalkJS = '<script src="https://cdn.jsdelivr.net/npm/gitalk@1.2.2/dist/gitalk.min.js" integrity="sha256-DcjhdbufsHMHflFjZtKNFnPKOAL2ybOxGcPOR4MtnJg=" crossorigin="anonymous"></script>'
gitalkCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1.2.2/dist/gitalk.css" integrity="sha256-rJVe5uyYRXdLM+Kkoj7JtN+9qI0bZTxkYTaNWODpg7U=" crossorigin="anonymous">'
timeagoJS = '<script src="https://cdn.jsdelivr.net/npm/timeago.js@3.0.2/dist/timeago.min.js" integrity="sha256-jwCP0NAdCBloaIWTWHmW4i3snUNMHUNO+jr9rYd2iOI=" crossorigin="anonymous"></script>' timeagoJS = '<script src="https://cdn.jsdelivr.net/npm/timeago.js@3.0.2/dist/timeago.min.js" integrity="sha256-jwCP0NAdCBloaIWTWHmW4i3snUNMHUNO+jr9rYd2iOI=" crossorigin="anonymous"></script>'
timeagoLocalesJS = '<script src="https://cdn.jsdelivr.net/npm/timeago.js@3.0.2/dist/timeago.locales.min.js" integrity="sha256-ZwofwC1Lf/faQCzN7nZtfijVV6hSwxjQMwXL4gn9qU8=" crossorigin="anonymous"></script>' timeagoLocalesJS = '<script src="https://cdn.jsdelivr.net/npm/timeago.js@3.0.2/dist/timeago.locales.min.js" integrity="sha256-ZwofwC1Lf/faQCzN7nZtfijVV6hSwxjQMwXL4gn9qU8=" crossorigin="anonymous"></script>'
flowchartDiagramsJS = '<script src="https://cdn.jsdelivr.net/npm/raphael@2.2.7/raphael.min.js" integrity="sha256-67By+NpOtm9ka1R6xpUefeGOY8kWWHHRAKlvaTJ7ONI=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/flowchart.js@1.8.0/release/flowchart.min.js" integrity="sha256-zNGWjubXoY6rb5MnmpBNefO0RgoVYfle9p0tvOQM+6k=" crossorigin="anonymous"></script>' flowchartDiagramsJS = '<script src="https://cdn.jsdelivr.net/npm/raphael@2.2.7/raphael.min.js" integrity="sha256-67By+NpOtm9ka1R6xpUefeGOY8kWWHHRAKlvaTJ7ONI=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/flowchart.js@1.8.0/release/flowchart.min.js" integrity="sha256-zNGWjubXoY6rb5MnmpBNefO0RgoVYfle9p0tvOQM+6k=" crossorigin="anonymous"></script>'
sequenceDiagramsCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bramp/js-sequence-diagrams@2.0.1/dist/sequence-diagram-min.css" integrity="sha384-6QbLKJMz5dS3adWSeINZe74uSydBGFbnzaAYmp+tKyq60S7H2p6V7g1TysM5lAaF" crossorigin="anonymous">' sequenceDiagramsCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bramp/js-sequence-diagrams@2.0.1/dist/sequence-diagram-min.css" integrity="sha384-6QbLKJMz5dS3adWSeINZe74uSydBGFbnzaAYmp+tKyq60S7H2p6V7g1TysM5lAaF" crossorigin="anonymous">'
sequenceDiagramsJS = '<script src="https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.js" integrity="sha256-4O4pS1SH31ZqrSO2A/2QJTVjTPqVe+jnYgOWUVr7EEc=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/snapsvg@0.5.1/dist/snap.svg-min.js" integrity="sha256-oI+elz+sIm+jpn8F/qEspKoKveTc5uKeFHNNVexe6d8=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/underscore@1.8.3/underscore-min.js" integrity="sha256-obZACiHd7gkOk9iIL/pimWMTJ4W/pBsKu+oZnSeBIek=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/gh/bramp/js-sequence-diagrams@2.0.1/dist/sequence-diagram-min.js" integrity="sha384-8748Vn52gHJYJI0XEuPB2QlPVNUkJlJn9tHqKec6J3q2r9l8fvRxrgn/E5ZHV0sP" crossorigin="anonymous"></script>' sequenceDiagramsJS = '<script src="https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.js" integrity="sha256-4O4pS1SH31ZqrSO2A/2QJTVjTPqVe+jnYgOWUVr7EEc=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/snapsvg@0.5.1/dist/snap.svg-min.js" integrity="sha256-oI+elz+sIm+jpn8F/qEspKoKveTc5uKeFHNNVexe6d8=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/underscore@1.8.3/underscore-min.js" integrity="sha256-obZACiHd7gkOk9iIL/pimWMTJ4W/pBsKu+oZnSeBIek=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/gh/bramp/js-sequence-diagrams@2.0.1/dist/sequence-diagram-min.js" integrity="sha384-8748Vn52gHJYJI0XEuPB2QlPVNUkJlJn9tHqKec6J3q2r9l8fvRxrgn/E5ZHV0sP" crossorigin="anonymous"></script>'
# comment
gitmentJS = '<script src="https://cdn.jsdelivr.net/npm/gitment@0.0.3/dist/gitment.browser.min.js" crossorigin="anonymous"></script>'
gitmentCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitment@0.0.3/style/default.min.css" crossorigin="anonymous">'
gitalkJS = '<script src="https://cdn.jsdelivr.net/npm/gitalk@1.2.2/dist/gitalk.min.js" integrity="sha256-DcjhdbufsHMHflFjZtKNFnPKOAL2ybOxGcPOR4MtnJg=" crossorigin="anonymous"></script>'
gitalkCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1.2.2/dist/gitalk.css" integrity="sha256-rJVe5uyYRXdLM+Kkoj7JtN+9qI0bZTxkYTaNWODpg7U=" crossorigin="anonymous">'
# Display a message at the beginning of an article to warn the readers that it's content may be outdated. # Display a message at the beginning of an article to warn the readers that it's content may be outdated.
# 在文章开头显示提示信息,提醒读者文章内容可能过时。 # 在文章开头显示提示信息,提醒读者文章内容可能过时。

View file

@ -29,8 +29,8 @@
{{- end }} {{- end }}
<!-- baidu & google verification --> <!-- baidu & google verification -->
{{ with .Site.Params.baidu_verification }}<meta name="baidu-site-verification" content="{{.}}" />{{ end }} {{ with .Site.Params.baiduVerification }}<meta name="baidu-site-verification" content="{{.}}" />{{ end }}
{{ with .Site.Params.google_verification }}<meta name="google-site-verification" content="{{.}}" />{{ end }} {{ with .Site.Params.googleVerification }}<meta name="google-site-verification" content="{{.}}" />{{ end }}
<!-- Site Generator --> <!-- Site Generator -->
<meta name="generator" content="Hugo {{ .Hugo.Version }}" /> <meta name="generator" content="Hugo {{ .Hugo.Version }}" />
@ -63,7 +63,7 @@
<!-- Styles --> <!-- Styles -->
<link href="{{ "dist/even.min.css?v=3.2.0" | relURL }}" rel="stylesheet"> <link href="{{ "dist/even.min.css?v=3.2.0" | relURL }}" rel="stylesheet">
{{ if .Site.Params.publicCDN.enable -}} {{ if .Site.Params.publicCDN.enable -}}
{{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCss | safeHTML }}{{ end }} {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCSS | safeHTML }}{{ end }}
{{- else -}} {{- else -}}
{{ if .Site.Params.fancybox }}<link href="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.css" | relURL }}" rel="stylesheet">{{ end }} {{ if .Site.Params.fancybox }}<link href="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.css" | relURL }}" rel="stylesheet">{{ end }}
{{- end }} {{- end }}

View file

@ -3,7 +3,7 @@
{{- if .Site.Params.publicCDN.enable }} {{- if .Site.Params.publicCDN.enable }}
{{ .Site.Params.publicCDN.jquery | safeHTML }} {{ .Site.Params.publicCDN.jquery | safeHTML }}
{{ .Site.Params.publicCDN.slideout | safeHTML }} {{ .Site.Params.publicCDN.slideout | safeHTML }}
{{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJs | safeHTML }}{{ end }} {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJS | safeHTML }}{{ end }}
{{- else -}} {{- else -}}
<script type="text/javascript" src="{{ "lib/jquery/jquery-3.2.1.min.js" | relURL }}"></script> <script type="text/javascript" src="{{ "lib/jquery/jquery-3.2.1.min.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "lib/slideout/slideout-1.0.1.min.js" | relURL }}"></script> <script type="text/javascript" src="{{ "lib/slideout/slideout-1.0.1.min.js" | relURL }}"></script>
@ -90,7 +90,7 @@
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{- end -}} {{- end -}}
{{- with .Site.Params.baidu_analytics -}} {{- with .Site.Params.baiduAnalytics -}}
<script id="baidu_analytics"> <script id="baidu_analytics">
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
@ -103,8 +103,8 @@
</script> </script>
{{- end }} {{- end }}
<!-- baidu_push --> <!-- baidu push -->
{{- if .Site.Params.baidu_push -}} {{- if .Site.Params.baiduPush -}}
<script id="baidu_push"> <script id="baidu_push">
(function(){ (function(){
if (window.location.hostname === 'localhost') return; if (window.location.hostname === 'localhost') return;
@ -123,6 +123,6 @@
{{- end }} {{- end }}
<!-- custom js --> <!-- custom js -->
{{ range .Site.Params.customJS }} {{ range .Site.Params.customJS -}}
<script src="{{ "/js/" | relURL }}{{ . }}"></script> <script src="{{ "/js/" | relURL }}{{ . }}"></script>
{{ end }} {{ end }}