mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-08 14:39:44 +00:00
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:
parent
90a17f8540
commit
fcb48d9be0
4 changed files with 39 additions and 19 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -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>
|
||||
# [3.2.0](https://github.com/olOwOlo/hugo-theme-even/compare/v3.1.1...v3.2.0) (2018-07-06)
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ baseURL = "http://localhost:1313/"
|
|||
languageCode = "en"
|
||||
defaultContentLanguage = "en" # en / zh-cn / ... (This field determines which i18n file to use)
|
||||
title = "Even - A super concise theme for Hugo"
|
||||
preserveTaxonomyNames = true
|
||||
enableRobotsTXT = true
|
||||
enableEmoji = true
|
||||
theme = "even"
|
||||
|
||||
preserveTaxonomyNames = true
|
||||
hasCJKLanguage = true # has chinese/japanese/korean ? # 自动检测是否包含 中文\日文\韩文
|
||||
paginate = 5 # 首页每页显示的文章数
|
||||
disqusShortname = "" # disqus_shortname
|
||||
|
@ -83,11 +83,13 @@ copyright = "" # default: author.name ↓ # 默认为下面配
|
|||
|
||||
changyanAppid = "" # Changyan app id # 畅言
|
||||
changyanAppkey = "" # Changyan app key
|
||||
|
||||
livereUID = "" # LiveRe UID # 来必力
|
||||
baidu_push = false # baidu push # 百度
|
||||
baidu_analytics = "" # Baidu Analytics
|
||||
baidu_verification = "" # Baidu Verification
|
||||
google_verification = "" # Google_Verification # 谷歌
|
||||
|
||||
baiduPush = false # baidu push # 百度
|
||||
baiduAnalytics = "" # Baidu Analytics
|
||||
baiduVerification = "" # Baidu Verification
|
||||
googleVerification = "" # Google Verification # 谷歌
|
||||
|
||||
# Link custom CSS and JS assets
|
||||
# (relative to /static/css and /static/js respectively)
|
||||
|
@ -98,17 +100,18 @@ copyright = "" # default: author.name ↓ # 默认为下面配
|
|||
enable = false
|
||||
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>'
|
||||
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">'
|
||||
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">'
|
||||
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">'
|
||||
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>'
|
||||
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">'
|
||||
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.
|
||||
# 在文章开头显示提示信息,提醒读者文章内容可能过时。
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue