diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-07-06 22:50:37 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-07-06 22:50:37 +0800 |
commit | fcb48d9be078df0420ff98228fee4ac1b013f47b (patch) | |
tree | 8cc474c4c2cfbe29dead77a59eb805fb608f2891 /layouts | |
parent | 90a17f8540f33b87fabc71bf22910c4d6792827c (diff) |
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 |
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/head.html | 6 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 86ab6cf..19c000c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -29,8 +29,8 @@ {{- end }} <!-- baidu & google verification --> -{{ with .Site.Params.baidu_verification }}<meta name="baidu-site-verification" content="{{.}}" />{{ end }} -{{ with .Site.Params.google_verification }}<meta name="google-site-verification" content="{{.}}" />{{ end }} +{{ with .Site.Params.baiduVerification }}<meta name="baidu-site-verification" content="{{.}}" />{{ end }} +{{ with .Site.Params.googleVerification }}<meta name="google-site-verification" content="{{.}}" />{{ end }} <!-- Site Generator --> <meta name="generator" content="Hugo {{ .Hugo.Version }}" /> @@ -63,7 +63,7 @@ <!-- Styles --> <link href="{{ "dist/even.min.css?v=3.2.0" | relURL }}" rel="stylesheet"> {{ 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 -}} {{ if .Site.Params.fancybox }}<link href="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.css" | relURL }}" rel="stylesheet">{{ end }} {{- end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index b9c9a55..47df69b 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -3,7 +3,7 @@ {{- if .Site.Params.publicCDN.enable }} {{ .Site.Params.publicCDN.jquery | 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 -}} <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> @@ -90,7 +90,7 @@ {{ template "_internal/google_analytics_async.html" . }} {{- end -}} -{{- with .Site.Params.baidu_analytics -}} +{{- with .Site.Params.baiduAnalytics -}} <script id="baidu_analytics"> var _hmt = _hmt || []; (function() { @@ -103,8 +103,8 @@ </script> {{- end }} -<!-- baidu_push --> -{{- if .Site.Params.baidu_push -}} +<!-- baidu push --> +{{- if .Site.Params.baiduPush -}} <script id="baidu_push"> (function(){ if (window.location.hostname === 'localhost') return; @@ -123,6 +123,6 @@ {{- end }} <!-- custom js --> -{{ range .Site.Params.customJS }} +{{ range .Site.Params.customJS -}} <script src="{{ "/js/" | relURL }}{{ . }}"></script> {{ end }} |