- {{- if eq .Data.Plural "categories" }}
+ {{ if eq .Data.Plural "categories" }}
{{ $cats := .Site.Taxonomies.categories }}
- {{- T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML -}}
+ {{ T "CatesCounterTitle" (.Scratch.Get "catsCount") | safeHTML }}
- {{- range $name, $items := $cats }}
+ {{ range $name, $items := $cats }}
-
{{ .Page.Title }}
{{ len $items }}
- {{- end }}
+ {{ end }}
- {{- end }}
- {{- if eq .Data.Plural "tags" }}
+ {{ end }}
+ {{ if eq .Data.Plural "tags" }}
{{ $tags := .Site.Taxonomies.tags }}
- {{- T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML -}}
+ {{ T "TagsCounterTitle" (.Scratch.Get "tagsCount") | safeHTML }}
- {{- end }}
+ {{ end }}
-{{- end }}
+{{ end }}
diff --git a/layouts/archives/section.html b/layouts/archives/section.html
index 17aba2f..2c790eb 100644
--- a/layouts/archives/section.html
+++ b/layouts/archives/section.html
@@ -1,30 +1,30 @@
-{{- define "title" }}
-{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title -}}
-{{- end -}}
+{{ define "title" }}
+{{ .Params.Title | default (T .Section) | default .Section | dict "Some" | T "AllSome" }} - {{ .Site.Title }}
+{{ end }}
{{ define "main_inner_class" }}archive posts-collapse{{ end }}
-{{- define "main" }}
+{{ define "main" }}
- {{- $cheers := "Um" }}
- {{- $posts := .Scratch.Get "postsCount" }}
- {{- if gt $posts 210 }}
- {{- $cheers = "Excellent" }}
- {{- else if gt $posts 130 }}
- {{- $cheers = "Great" }}
- {{- else if gt $posts 80 }}
- {{- $cheers = "Good" }}
- {{- else if gt $posts 50 }}
- {{- $cheers = "Nice" }}
- {{- else if gt $posts 30 }}
- {{- $cheers = "Ok" }}
- {{- end }}
+ {{ $cheers := "Um" }}
+ {{ $posts := .Scratch.Get "postsCount" }}
+ {{ if gt $posts 210 }}
+ {{ $cheers = "Excellent" }}
+ {{ else if gt $posts 130 }}
+ {{ $cheers = "Great" }}
+ {{ else if gt $posts 80 }}
+ {{ $cheers = "Good" }}
+ {{ else if gt $posts 50 }}
+ {{ $cheers = "Nice" }}
+ {{ else if gt $posts 30 }}
+ {{ $cheers = "Ok" }}
+ {{ end }}
@@ -32,5 +32,5 @@
-{{- partial "pagination.html" . }}
-{{- end }}
\ No newline at end of file
+{{ partial "pagination.html" . }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/flinks/single.html b/layouts/flinks/single.html
index 5206c7b..0cb7330 100644
--- a/layouts/flinks/single.html
+++ b/layouts/flinks/single.html
@@ -1,6 +1,6 @@
-{{- define "title" }}{{- .Title }} - {{ .Site.Title -}}{{- end }}
+{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
-{{- define "main_inner_class" }}flinks posts-expand{{- end }}
+{{ define "main_inner_class" }}flinks posts-expand{{ end }}
{{ define "main" }}
diff --git a/layouts/index.html b/layouts/index.html
index 1f743de..382f040 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,11 +1,11 @@
-{{- define "main_inner_class" }}index posts-expand{{- end }}
+{{ define "main_inner_class" }}index posts-expand{{ end }}
-{{- define "main" }}
+{{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
-{{- range $paginator.Pages }}
+{{ range $paginator.Pages }}
{{ partial "post.html" (dict "ctx" . "IsHome" true) }}
-{{- end }}
+{{ end }}
-{{- partial "partials/pagination.html" . }}
-{{- end }}
\ No newline at end of file
+{{ partial "partials/pagination.html" . }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/_funs/get_res.html b/layouts/partials/_funs/get_res.html
index 21749d1..926ce54 100644
--- a/layouts/partials/_funs/get_res.html
+++ b/layouts/partials/_funs/get_res.html
@@ -6,15 +6,15 @@
{{ with .res.alias2 }}
{{ $npm = . }}
{{ end }}
-{{- $file := .res.file }}
+{{ $file := .res.file }}
-{{- if ne .vendor "unpkg" }}
- {{- with .res.alias }}
- {{- $npm = . }}
- {{- end }}
- {{- $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
- {{- $fmt = "%s/%s/%s/%s" }}
-{{- end }}
+{{ if ne .vendor "unpkg" }}
+ {{ with .res.alias }}
+ {{ $npm = . }}
+ {{ end }}
+ {{ $file = replaceRE `(dist|lib|source\/js)\/` "" .res.file }}
+ {{ $fmt = "%s/%s/%s/%s" }}
+{{ end }}
{{ $pluginRes := printf $fmt .router $npm .res.version $file }}
diff --git a/layouts/partials/_thirdparty/share/addthis.html b/layouts/partials/_thirdparty/share/addthis.html
index 683aeb0..520e2e1 100644
--- a/layouts/partials/_thirdparty/share/addthis.html
+++ b/layouts/partials/_thirdparty/share/addthis.html
@@ -1,3 +1,3 @@
-{{- if isset .Site.Params "addthisid" }}
+{{ if isset .Site.Params "addthisid" }}
@@ -8,55 +8,55 @@
©
- {{- $year := now.Year }}
- {{- if isset $ft "since" }}
- {{- if gt $year $ft.since }}
+ {{ $year := now.Year }}
+ {{ if isset $ft "since" }}
+ {{ if gt $year $ft.since }}
{{ $ft.since }} - {{ $year }}
- {{- else }}
+ {{ else }}
{{ $year }}
- {{- end }}
- {{- else }}
+ {{ end }}
+ {{ else }}
{{ $year }}
- {{- end }}
+ {{ end }}
{{ $ft.copyright | default .Site.Params.author }}
-{{- if $ft.powered }}
+{{ if $ft.powered }}
{{ $pb := printf "
Hugo &
Hugo NexT.%s" hugo.Version .Site.Data.config.version .Site.Params.scheme }}
- {{- printf (T "FooterPowerby") $pb | safeHTML }}
+ {{ printf (T "FooterPowerby") $pb | safeHTML }}
-{{- end }}
-{{- with $ft.beian }}
-{{- if .enable }}
+{{ end }}
+{{ with $ft.beian }}
+{{ if .enable }}
-{{- end }}
-{{- end }}
-{{- with $ft.vendors }}
+{{ end }}
+{{ end }}
+{{ with $ft.vendors }}
{{ if .enable }}
-{{- end }}
-{{- end }}
+{{ end }}
+{{ end }}
-{{- $custom := .Scratch.Get "footer" }}
-{{- if $custom }}
+{{ $custom := .Scratch.Get "footer" }}
+{{ if $custom }}
{{ partialCached $custom . }}
-{{- end }}
+{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2d3a8ed..768e626 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,10 +1,10 @@
-{{- partial "head/meta.html" . }}
-{{- partial "head/opengraph.html" . }}
-{{- partial "head/twitter.html" . }}
-{{- partial "head/googleplus.html" . }}
-{{- partial "head/facebook.html" . }}
-{{- partialCached "head/verify.html" . }}
-{{- partialCached "head/style.html" . }}
+{{ partial "head/meta.html" . }}
+{{ partial "head/opengraph.html" . }}
+{{ partial "head/twitter.html" . }}
+{{ partial "head/googleplus.html" . }}
+{{ partial "head/facebook.html" . }}
+{{ partialCached "head/verify.html" . }}
+{{ partialCached "head/style.html" . }}
-{{- partial "head/config.html" . }}
-{{- partialCached "head/analytics.html" . }}
+{{ partial "head/config.html" . }}
+{{ partialCached "head/analytics.html" . }}
diff --git a/layouts/partials/head/analytics.html b/layouts/partials/head/analytics.html
index 63301bb..a18be0f 100644
--- a/layouts/partials/head/analytics.html
+++ b/layouts/partials/head/analytics.html
@@ -1,12 +1,12 @@
-{{- if isset .Site.Params.analytics "laid" }}
+{{ if isset .Site.Params.analytics "laid" }}
{{ partial "_thirdparty/analytics/51la.html" . }}
-{{- end }}
-{{- if isset .Site.Params.analytics "baidu" }}
+{{ end }}
+{{ if isset .Site.Params.analytics "baidu" }}
{{ partial "_thirdparty/analytics/baidu.html" . }}
-{{- end }}
-{{- if isset .Site.Params.analytics "google" }}
+{{ end }}
+{{ if isset .Site.Params.analytics "google" }}
{{ partial "_thirdparty/analytics/google.html" . }}
-{{- end }}
-{{- if isset .Site.Params.analytics "busuanzi" }}
+{{ end }}
+{{ if isset .Site.Params.analytics "busuanzi" }}
{{ partial "_thirdparty/analytics/busuanzi.html" . }}
-{{- end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/head/config.html b/layouts/partials/head/config.html
index c4b9b5b..f0ae8ea 100644
--- a/layouts/partials/head/config.html
+++ b/layouts/partials/head/config.html
@@ -1,11 +1,11 @@
-{{- $pageCfg := dict
+{{ $pageCfg := dict
"isHome" .IsHome
"isPage" .IsPage
"comments" (.Scratch.Get "isComment")
"permalink" (.Page.Permalink | absURL)
"path" (.Page.Permalink | path.Base)
"title" .Page.Title
--}}
+}}
{{/* Append waline pageview & comment plugin */}}
{{ if and .Site.Params.waline ( or .Site.Params.waline.pageView .Site.Params.waline.comment) }}
@@ -37,4 +37,4 @@
{{ $pageCfg = merge $pageCfg (dict "math" $math) }}
{{ end }}
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/layouts/partials/head/facebook.html b/layouts/partials/head/facebook.html
index 6d04596..8873bdd 100644
--- a/layouts/partials/head/facebook.html
+++ b/layouts/partials/head/facebook.html
@@ -1,5 +1,5 @@
-{{- with .Site.Params.openGraph.facebook }}
-{{- range $attr, $val := . }}
+{{ with .Site.Params.openGraph.facebook }}
+{{ range $attr, $val := . }}
-{{- end }}
-{{- end }}
\ No newline at end of file
+{{ end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/head/favicon.html b/layouts/partials/head/favicon.html
index 3fc20ac..18d1347 100644
--- a/layouts/partials/head/favicon.html
+++ b/layouts/partials/head/favicon.html
@@ -1,9 +1,9 @@
-{{- with .Site.Params.favicon }}
+{{ with .Site.Params.favicon }}
-{{- end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/head/googleplus.html b/layouts/partials/head/googleplus.html
index 391198e..0b310f3 100644
--- a/layouts/partials/head/googleplus.html
+++ b/layouts/partials/head/googleplus.html
@@ -1,3 +1,3 @@
-{{- with .Site.Params.openGraph.googlePlus }}
+{{ with .Site.Params.openGraph.googlePlus }}
-{{- end }}
\ No newline at end of file
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/head/meta.html b/layouts/partials/head/meta.html
index 338c015..6edd349 100644
--- a/layouts/partials/head/meta.html
+++ b/layouts/partials/head/meta.html
@@ -1,10 +1,10 @@
-{{- if .Site.Params.darkmode }}
+{{ if .Site.Params.darkmode }}
-{{- else }}
+{{ else }}
-{{- end }}
+{{ end }}
{{ hugo.Generator }}
@@ -13,18 +13,18 @@
-{{- if .IsPage }}
-{{- with .Date }}
+{{ if .IsPage }}
+{{ with .Date }}
-{{- end }}
-{{- with .Lastmod }}
+{{ end }}
+{{ with .Lastmod }}
-{{- end }}
-{{- end }}
-{{- $img := .Site.Params.customLogo | default .Site.Params.avatar.url }}
-{{- if and .IsPage (isset .Params "images") }}
- {{- $img := index .Params.images 0 }}
-{{- end }}
-{{- .Scratch.Set "metaImg" $img }}
+{{ end }}
+{{ end }}
+{{ $img := .Site.Params.customLogo | default .Site.Params.avatar.url }}
+{{ if and .IsPage (isset .Params "images") }}
+ {{ $img := index .Params.images 0 }}
+{{ end }}
+{{ .Scratch.Set "metaImg" $img }}
diff --git a/layouts/partials/head/open_graph.html b/layouts/partials/head/open_graph.html
index bdf0a9f..8316fae 100644
--- a/layouts/partials/head/open_graph.html
+++ b/layouts/partials/head/open_graph.html
@@ -1,9 +1,9 @@
-{{- $Site := .Site -}}
-{{- $Params := .Site.Params -}}
-{{- $Page := .Page -}}
-{{- $langCode := .Scratch.Get "langCode" -}}
-{{- with .Site.Params.openGraph -}}
-{{- if .enable -}}
+{{ $Site := .Site }}
+{{ $Params := .Site.Params }}
+{{ $Page := .Page }}
+{{ $langCode := .Scratch.Get "langCode" }}
+{{ with .Site.Params.openGraph }}
+{{ if .enable }}
@@ -12,21 +12,21 @@
-{{- with .twitter -}}
-{{- range $attr, $val := . }}
+{{ with .twitter }}
+{{ range $attr, $val := . }}
-{{- end -}}
-{{- end -}}
+{{ end }}
+{{ end }}
-{{- with .googlePlus }}
+{{ with .googlePlus }}
-{{- end -}}
+{{ end }}
-{{- with .facebook -}}
-{{- range $attr, $val := . }}
+{{ with .facebook }}
+{{ range $attr, $val := . }}
-{{- end -}}
-{{- end -}}
+{{ end }}
+{{ end }}
-{{- end -}}
-{{- end -}}
\ No newline at end of file
+{{ end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/head/opengraph.html b/layouts/partials/head/opengraph.html
index 199be36..eb11f17 100644
--- a/layouts/partials/head/opengraph.html
+++ b/layouts/partials/head/opengraph.html
@@ -1,4 +1,4 @@
-{{- if .Site.Params.openGraph.enable }}
+{{ if .Site.Params.openGraph.enable }}
@@ -9,9 +9,9 @@
-{{- if .IsPage }}
+{{ if .IsPage }}
-{{- end }}
-{{- end }}
+{{ end }}
+{{ end }}
diff --git a/layouts/partials/head/style.html b/layouts/partials/head/style.html
index c91bd20..6faa942 100644
--- a/layouts/partials/head/style.html
+++ b/layouts/partials/head/style.html
@@ -1,31 +1,31 @@
-{{- $cssRes := .Site.Data.resources.css }}
-{{- $vendor := .Site.Params.vendors.plugins }}
-{{- $router := .Scratch.Get "router" }}
+{{ $cssRes := .Site.Data.resources.css }}
+{{ $vendor := .Site.Params.vendors.plugins }}
+{{ $router := .Scratch.Get "router" }}
-{{- range $css := $cssRes }}
+{{ range $css := $cssRes }}
{{ $pluginCss := partial "_funs/get_res.html" (dict "res" . "vendor" $vendor "router" $router) }}
-{{- end }}
+{{ end }}
-{{- $scss := resources.Get "css/main.scss" }}
-{{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
-{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
-{{- if hugo.IsProduction }}
-{{- $css = $css | minify | fingerprint }}
-{{- end }}
+{{ $scss := resources.Get "css/main.scss" }}
+{{ $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }}
+{{ $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
+{{ if hugo.IsProduction }}
+{{ $css = $css | minify | fingerprint }}
+{{ end }}
-{{- if .IsPage }}
+{{ if .IsPage }}
-{{- end }}
+{{ end }}
-{{- $custom := .Scratch.Get "style" }}
-{{- if $custom }}
+{{ $custom := .Scratch.Get "style" }}
+{{ if $custom }}
-{{- end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/head/twitter.html b/layouts/partials/head/twitter.html
index d485eb1..c33c933 100644
--- a/layouts/partials/head/twitter.html
+++ b/layouts/partials/head/twitter.html
@@ -1,5 +1,5 @@
-{{- with .Site.Params.openGraph.twitter }}
-{{- $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }}
+{{ with .Site.Params.openGraph.twitter }}
+{{ $img := $.Params.openGraph.twitter.image | default ($.Scratch.Get "metaImg") }}
diff --git a/layouts/partials/head/verify.html b/layouts/partials/head/verify.html
index f395321..bc1acc0 100644
--- a/layouts/partials/head/verify.html
+++ b/layouts/partials/head/verify.html
@@ -1,14 +1,14 @@
{{ if .IsHome }}
-{{- with .Site.Params.googleSiteVerification }}
+{{ with .Site.Params.googleSiteVerification }}
-{{- end }}
-{{- with .Site.Params.bingSiteVerification }}
+{{ end }}
+{{ with .Site.Params.bingSiteVerification }}
-{{- end }}
-{{- with .Site.Params.yandexSiteVerification }}
+{{ end }}
+{{ with .Site.Params.yandexSiteVerification }}
-{{- end }}
-{{- with .Site.Params.baiduSiteVerification }}
+{{ end }}
+{{ with .Site.Params.baiduSiteVerification }}
-{{- end }}
+{{ end }}
{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/header/brand.html b/layouts/partials/header/brand.html
index 0c1a8ad..11e66e8 100644
--- a/layouts/partials/header/brand.html
+++ b/layouts/partials/header/brand.html
@@ -9,9 +9,9 @@
- {{- if .Site.Params.linksSets.icon }}
+ {{ if .Site.Params.linksSets.icon }}
- {{- end }}
- {{- .Site.Params.linksSets.title }}
+ {{ end }}
+ {{ .Site.Params.linksSets.title }}
- {{- range $key,$val := .Site.Params.links }}
- {{- $vals := split $val "||" }}
- {{- $name := trim (index $vals 0) " " }}
- {{- $url := trim (index $vals 1) " " }}
+ {{ range $key,$val := .Site.Params.links }}
+ {{ $vals := split $val "||" }}
+ {{ $name := trim (index $vals 0) " " }}
+ {{ $url := trim (index $vals 1) " " }}
-
{{ $name }}
- {{- end }}
+ {{ end }}
-{{- end }}
\ No newline at end of file
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/sidebar/siteinfo.html b/layouts/partials/sidebar/siteinfo.html
index e03a5b9..f4c0bdc 100644
--- a/layouts/partials/sidebar/siteinfo.html
+++ b/layouts/partials/sidebar/siteinfo.html
@@ -9,8 +9,8 @@