diff --git a/layouts/404.html b/layouts/404.html
index 963ae583..234ac358 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,19 +1,19 @@
{{- define "title" }}
- {{- T "pageNotFound" | printf "404 %v" }} - {{ .Site.Title -}}
+ {{- T "pageNotFound" | printf "404 %v" }} - {{ .Site.Title -}}
{{- end -}}
{{- define "content" -}}
-
-
-
- {{- T "pageNotFoundText" -}}
-
-
-
-
+
+
+
+ {{- T "pageNotFoundText" -}}
+
+
+
+
{{- end -}}
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index a79cddf0..748da74a 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,10 +1,10 @@
{{- if .Title -}}
-
- {{- /* Title */ -}}
-
- {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
-
+
+ {{- /* Title */ -}}
+
+ {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
+
- {{- /* Paginate */ -}}
- {{- if .Pages -}}
- {{- $pages := .Pages.GroupByDate "2006" -}}
- {{- with .Site.Params.section.paginate | default .Site.Params.paginate -}}
- {{- $pages = $.Paginate $pages . -}}
- {{- else -}}
- {{- $pages = .Paginate $pages -}}
- {{- end -}}
- {{- range $pages.PageGroups -}}
-
{{ .Key }}
- {{- range .Pages -}}
-
-
- {{- .Title -}}
-
-
- {{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
-
-
- {{- end -}}
- {{- end -}}
- {{- partial "paginator.html" . -}}
+ {{- /* Paginate */ -}}
+ {{- if .Pages -}}
+ {{- $pages := .Pages.GroupByDate "2006" -}}
+ {{- with .Site.Params.section.paginate | default .Site.Params.paginate -}}
+ {{- $pages = $.Paginate $pages . -}}
+ {{- else -}}
+ {{- $pages = .Paginate $pages -}}
+ {{- end -}}
+ {{- range $pages.PageGroups -}}
+
{{ .Key }}
+ {{- range .Pages -}}
+
+
+ {{- .Title -}}
+
+
+ {{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
+
+
{{- end -}}
-
+ {{- end -}}
+ {{- partial "paginator.html" . -}}
+ {{- end -}}
+
{{- end -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index a34e22bd..2b090d9e 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,24 +1,24 @@
{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}}
{{- define "content" -}}
- {{- $params := .Scratch.Get "params" -}}
-
- {{- /* Title */ -}}
-
- {{- .Title -}}
-
+ {{- $params := .Scratch.Get "params" -}}
+
+ {{- /* Title */ -}}
+
+ {{- .Title -}}
+
- {{- /* Subtitle */ -}}
- {{- with $params.subtitle -}}
-
{{ . }}
- {{- end -}}
+ {{- /* Subtitle */ -}}
+ {{- with $params.subtitle -}}
+
{{ . }}
+ {{- end -}}
- {{- /* Content */ -}}
-
- {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
-
-
- {{- /* Comment */ -}}
- {{- partial "comment.html" . -}}
+ {{- /* Content */ -}}
+
+ {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
+
+ {{- /* Comment */ -}}
+ {{- partial "comment.html" . -}}
+
{{- end -}}
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index 990b6a9e..06cbc99d 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -1,75 +1,75 @@
{{- $params := .Params | merge .Site.Params.page -}}
- {{- /* Featured image */ -}}
- {{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
- {{- with .Resources.GetMatch "featured-image" -}}
- {{- $image = .RelPermalink -}}
- {{- end -}}
- {{- with .Resources.GetMatch "featured-image-preview" -}}
- {{- $image = .RelPermalink -}}
- {{- end -}}
- {{- with $image -}}
-
+ {{- /* Featured image */ -}}
+ {{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with .Resources.GetMatch "featured-image-preview" -}}
+ {{- $image = .RelPermalink -}}
+ {{- end -}}
+ {{- with $image -}}
+
+ {{- end -}}
+
+ {{- /* Title */ -}}
+
+
+ {{- /* Meta */ -}}
+
+ {{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
+ {{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
+
+ {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
+ {{- partial "plugin/link.html" $options -}}
+
+
+ {{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
+
+ {{- printf `` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
+
{{- end -}}
- {{- /* Title */ -}}
-
+ {{- $categories := slice -}}
+ {{- range .Params.categories -}}
+ {{- $category := partialCached "function/path.html" . . | printf "/categories/%v" | $.Site.GetPage -}}
+ {{- $categories = $categories | append (printf `
%v` $category.RelPermalink $category.Title) -}}
+ {{- end -}}
+ {{- with delimit $categories " " -}}
+
+ {{- dict "Categories" . | T "includedInCategories" | safeHTML -}}
+
+ {{- end -}}
+
- {{- /* Meta */ -}}
-
- {{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
- {{- $authorLink := $params.authorlink | default .Site.Author.link | default .Site.Home.RelPermalink -}}
-
- {{- $options := dict "Class" "author" "Destination" $authorLink "Title" "Author" "Rel" "author" "Icon" (dict "Class" "fas fa-user-circle fa-fw") "Content" $author -}}
- {{- partial "plugin/link.html" $options -}}
-
+ {{- /* Summary content */ -}}
+
+ {{- with .Summary -}}
+ {{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
+ {{- else -}}
+ {{- .Description | safeHTML -}}
+ {{- end -}}
+
- {{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
-
- {{- printf `` . . | dict "Date" | T "publishedOnDate" | safeHTML -}}
-
+ {{- /* Footer */ -}}
+
+ {{- end -}}
+
\ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 44dd92a4..6a42d1d2 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,41 +1,41 @@
{{- define "content" -}}
- {{- $params := .Scratch.Get "params" -}}
- {{- $profile := .Site.Params.home.profile -}}
- {{- $posts := .Site.Params.home.posts -}}
+ {{- $params := .Scratch.Get "params" -}}
+ {{- $profile := .Site.Params.home.profile -}}
+ {{- $posts := .Site.Params.home.posts -}}
-
- {{- /* Profile */ -}}
- {{- if ne $profile.enable false -}}
- {{- partial "home/profile.html" . -}}
- {{- end -}}
+
+ {{- /* Profile */ -}}
+ {{- if ne $profile.enable false -}}
+ {{- partial "home/profile.html" . -}}
+ {{- end -}}
- {{- /* Content */ -}}
- {{- if .Content -}}
-
-
- {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
-
-
- {{- end -}}
+ {{- /* Content */ -}}
+ {{- if .Content -}}
+
+
+ {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
+
+
+ {{- end -}}
- {{- /* Posts */ -}}
- {{- if ne $posts.enable false | and .Site.RegularPages -}}
- {{- /* Paginate */ -}}
- {{- $pages := where .Site.RegularPages "Type" "posts" -}}
- {{- if .Site.Params.page.hiddenFromHomePage -}}
- {{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
- {{- else -}}
- {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
- {{- end -}}
- {{- with $posts.paginate | default .Site.Params.paginate -}}
- {{- $pages = $.Paginate $pages . -}}
- {{- else -}}
- {{- $pages = .Paginate $pages -}}
- {{- end -}}
- {{- range $pages.Pages -}}
- {{- .Render "summary" -}}
- {{- end -}}
- {{- partial "paginator.html" . -}}
- {{- end -}}
-
+ {{- /* Posts */ -}}
+ {{- if ne $posts.enable false | and .Site.RegularPages -}}
+ {{- /* Paginate */ -}}
+ {{- $pages := where .Site.RegularPages "Type" "posts" -}}
+ {{- if .Site.Params.page.hiddenFromHomePage -}}
+ {{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
+ {{- else -}}
+ {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
+ {{- end -}}
+ {{- with $posts.paginate | default .Site.Params.paginate -}}
+ {{- $pages = $.Paginate $pages . -}}
+ {{- else -}}
+ {{- $pages = .Paginate $pages -}}
+ {{- end -}}
+ {{- range $pages.Pages -}}
+ {{- .Render "summary" -}}
+ {{- end -}}
+ {{- partial "paginator.html" . -}}
+ {{- end -}}
+
{{- end -}}
diff --git a/layouts/index.rss.xml b/layouts/index.rss.xml
index 355c26a5..8be1d176 100644
--- a/layouts/index.rss.xml
+++ b/layouts/index.rss.xml
@@ -1,43 +1,43 @@
-
-
- {{- .Site.Title -}}
-
-
- {{- .Permalink -}}
-
-
- {{- .Site.Params.description | default .Site.Title -}}
-
- Hugo -- gohugo.io
- {{- with .Site.LanguageCode -}}
-
- {{- . -}}
-
- {{- end -}}
- {{- with .Site.Author.email -}}
-
- {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
-
-
- {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
-
- {{- end -}}
- {{- with .Site.Copyright -}}
-
- {{- . -}}
-
- {{- end -}}
- {{- if not .Date.IsZero -}}
-
- {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
-
- {{- end -}}
- {{ with .OutputFormats.Get "RSS" }}
- {{ printf "" .Permalink .MediaType | safeHTML }}
- {{ end }}
- {{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
- {{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
- {{- end -}}
-
+
+
+ {{- .Site.Title -}}
+
+
+ {{- .Permalink -}}
+
+
+ {{- .Site.Params.description | default .Site.Title -}}
+
+ Hugo -- gohugo.io
+ {{- with .Site.LanguageCode -}}
+
+ {{- . -}}
+
+ {{- end -}}
+ {{- with .Site.Author.email -}}
+
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
+
+
+ {{- . }}{{ with $.Site.Author.name }} ({{ . }}){{ end -}}
+
+ {{- end -}}
+ {{- with .Site.Copyright -}}
+
+ {{- . -}}
+
+ {{- end -}}
+ {{- if not .Date.IsZero -}}
+
+ {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
+
+ {{- end -}}
+ {{ with .OutputFormats.Get "RSS" }}
+ {{ printf "" .Permalink .MediaType | safeHTML }}
+ {{ end }}
+ {{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
+ {{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
+ {{- end -}}
+
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
index 0382ae11..95073a6d 100644
--- a/layouts/partials/comment.html
+++ b/layouts/partials/comment.html
@@ -4,127 +4,127 @@
{{- $commentConfig := dict -}}
{{- if $comment.enable -}}
-
{{- end -}}
{{- dict "comment" $commentConfig | dict "config" | merge (.Scratch.Get "this") | .Scratch.Set "this" -}}
diff --git a/layouts/partials/function/id.html b/layouts/partials/function/id.html
index e84ef9c2..a423e1d7 100644
--- a/layouts/partials/function/id.html
+++ b/layouts/partials/function/id.html
@@ -3,6 +3,6 @@
{{- $id := printf "id-%d" $count -}}
{{- $count | add 1 | .Scratch.SetInMap "this" "count" -}}
{{- with .Content -}}
- {{- dict $id . | dict "data" | dict "config" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
+ {{- dict $id . | dict "data" | dict "config" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- end -}}
{{- return $id -}}
diff --git a/layouts/partials/function/resource.html b/layouts/partials/function/resource.html
index 2febef3f..648b2664 100644
--- a/layouts/partials/function/resource.html
+++ b/layouts/partials/function/resource.html
@@ -1,16 +1,16 @@
{{- $resource := 0 -}}
{{- $url := urls.Parse .Path -}}
{{- if not $url.Host | and $url.Path | and (strings.HasSuffix $url.Path "/" | not) -}}
- {{- if .Resources -}}
- {{- with .Resources.GetMatch $url.Path -}}
- {{- $resource = . -}}
- {{- end -}}
+ {{- if .Resources -}}
+ {{- with .Resources.GetMatch $url.Path -}}
+ {{- $resource = . -}}
{{- end -}}
- {{- if not $resource -}}
- {{- with resources.Get $url.Path -}}
- {{- $resource = . -}}
- {{- end -}}
+ {{- end -}}
+ {{- if not $resource -}}
+ {{- with resources.Get $url.Path -}}
+ {{- $resource = . -}}
{{- end -}}
+ {{- end -}}
{{- end -}}
{{- return $resource -}}
diff --git a/layouts/partials/head/link.html b/layouts/partials/head/link.html
index 080a1f9c..e82c7f89 100644
--- a/layouts/partials/head/link.html
+++ b/layouts/partials/head/link.html
@@ -2,31 +2,31 @@
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
{{- if not .Site.Params.app.noFavicon -}}
- {{- with .Site.Params.app.svgFavicon -}}
-
- {{- else -}}
-
-
-
- {{- end -}}
-
- {{- with .Site.Params.app.iconColor -}}
-
- {{- end -}}
-
+ {{- with .Site.Params.app.svgFavicon -}}
+
+ {{- else -}}
+
+
+
+ {{- end -}}
+
+ {{- with .Site.Params.app.iconColor -}}
+
+ {{- end -}}
+
{{- end -}}
{{- if .PrevInSection -}}
-
+
{{- end -}}
{{- if .NextInSection -}}
-
+
{{- end -}}
{{- with .OutputFormats.Get "RSS" -}}
-
-
+
+
{{- end -}}
{{- /* normalize.css */ -}}
diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html
index d431ad06..08795922 100644
--- a/layouts/partials/head/seo.html
+++ b/layouts/partials/head/seo.html
@@ -1,153 +1,153 @@
{{- $params := .Scratch.Get "params" -}}
{{- with .Site.Params.verification.google -}}
-
+
{{- end -}}
{{- with .Site.Params.verification.bing -}}
-
+
{{- end -}}
{{- with .Site.Params.verification.yandex -}}
-
+
{{- end -}}
{{- with .Site.Params.verification.pinterest -}}
-
+
{{- end -}}
{{- with .Site.Params.verification.baidu -}}
-
+
{{- end -}}
{{- /* Home SEO */ -}}
{{- if .IsHome -}}
-
+ "width": {{ .Width }},
+ "height": {{ .Height }}
+ },
+ {{- else -}}
+ {{- with $image -}}
+ "image": "{{ . | absURL }}",
+ {{- end -}}
+ {{- end -}}
+ {{- with .Site.Params.seo.thumbnailUrl -}}
+ {{- with dict "Path" . "Resources" $.Resources | partial "function/resource.html" -}}
+ "thumbnailUrl": "{{ .Permalink }}",
+ {{- else -}}
+ "thumbnailUrl": "{{ . | absURL }}",
+ {{- end -}}
+ {{- end -}}
+ {{- with .Site.Copyright -}}
+ "license": "{{ . | safeHTML }}",
+ {{- end -}}
+ "name": {{ .Site.Title | safeHTML }}
+ }
+
{{- /* Page SEO */ -}}
{{- else if .IsPage -}}
-
+ {{- end -}}
+ },
+ {{- with .Params.author | default .Site.Author.name | default (T "author") -}}
+ "author": {
+ "@type": "Person",
+ "name": {{ . | safeHTML }}
+ },
+ {{- end -}}
+ "description": {{ .Description | safeHTML }}
+ }
+
{{- end -}}
diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html
index b37e1528..b1433156 100644
--- a/layouts/partials/home/profile.html
+++ b/layouts/partials/home/profile.html
@@ -1,95 +1,95 @@
{{- $profile := .Site.Params.home.profile -}}
- {{- $avatar := $profile.avatarURL -}}
- {{- with $profile.gravatarEmail -}}
- {{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%v?s=240&d=mp" -}}
- {{- end -}}
- {{- if $avatar -}}
-
- {{- $menus := $.Site.Menus.main | default slice -}}
- {{- with index $menus 0 -}}
- {{- $url := .URL | relLangURL -}}
- {{- with .Page -}}
- {{- $url = .RelPermalink -}}
- {{- end -}}
-
- {{- dict "Src" $avatar | partial "plugin/image.html" -}}
-
- {{- else -}}
- {{- dict "Src" $avatar | partial "plugin/image.html" -}}
- {{- end -}}
-
- {{- end -}}
+ {{- $avatar := $profile.avatarURL -}}
+ {{- with $profile.gravatarEmail -}}
+ {{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%v?s=240&d=mp" -}}
+ {{- end -}}
+ {{- if $avatar -}}
+
+ {{- $menus := $.Site.Menus.main | default slice -}}
+ {{- with index $menus 0 -}}
+ {{- $url := .URL | relLangURL -}}
+ {{- with .Page -}}
+ {{- $url = .RelPermalink -}}
+ {{- end -}}
+
+ {{- dict "Src" $avatar | partial "plugin/image.html" -}}
+
+ {{- else -}}
+ {{- dict "Src" $avatar | partial "plugin/image.html" -}}
+ {{- end -}}
+
+ {{- end -}}
- {{- with $profile.title -}}
-
- {{- . | safeHTML -}}
-
- {{- end -}}
+ {{- with $profile.title -}}
+
+ {{- . | safeHTML -}}
+
+ {{- end -}}
- {{- with $profile.subtitle -}}
-
- {{- if $profile.typeit -}}
- {{- $id := dict "Content" . "Scratch" $.Scratch | partial "function/id.html" -}}
-
- {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
- {{- else -}}
- {{- . -}}
- {{- end -}}
-
- {{- end -}}
+ {{- with $profile.subtitle -}}
+
+ {{- if $profile.typeit -}}
+ {{- $id := dict "Content" . "Scratch" $.Scratch | partial "function/id.html" -}}
+
+ {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
+ {{- else -}}
+ {{- . -}}
+ {{- end -}}
+
+ {{- end -}}
- {{- if $profile.social -}}
-
- {{- $socialMap := resources.Get "data/social.yml" | transform.Unmarshal -}}
- {{- $socialArr := slice -}}
- {{- range $key, $value := .Site.Params.social -}}
- {{- $social := $key | lower | index $socialMap | default dict -}}
- {{- if $value -}}
- {{- if reflect.IsMap $value -}}
- {{- with $value.weight -}}
- {{- $social = dict "Weight" . | merge $social -}}
- {{- end -}}
- {{- with $value.prefix -}}
- {{- $social = dict "Prefix" . | merge $social -}}
- {{- end -}}
- {{- with $value.template -}}
- {{- $social = dict "Template" . | merge $social -}}
- {{- end -}}
- {{- with $value.id -}}
- {{- $social = dict "Id" . | merge $social -}}
- {{- end -}}
- {{- with $value.url -}}
- {{- $social = dict "Url" . | merge $social -}}
- {{- end -}}
- {{- with $value.title -}}
- {{- $social = dict "Title" . | merge $social -}}
- {{- end -}}
- {{- with $value.newtab -}}
- {{- $social = dict "Newtab" . | merge $social -}}
- {{- end -}}
- {{- with $value.icon -}}
- {{- $social = dict "Icon" . | merge $social -}}
- {{- end -}}
- {{- else if ne $value true -}}
- {{- $social = dict "Id" $value | merge $social -}}
- {{- end -}}
- {{- if $social.Icon.Simpleicons -}}
- {{- $prefix := ($.Scratch.Get "cdn" | default dict).simpleIconsPrefix -}}
- {{- $social = dict "Prefix" $prefix | dict "Icon" | merge $social -}}
- {{- end -}}
- {{- $socialArr = $socialArr | append $social -}}
- {{- end -}}
+ {{- if $profile.social -}}
+
+ {{- $socialMap := resources.Get "data/social.yml" | transform.Unmarshal -}}
+ {{- $socialArr := slice -}}
+ {{- range $key, $value := .Site.Params.social -}}
+ {{- $social := $key | lower | index $socialMap | default dict -}}
+ {{- if $value -}}
+ {{- if reflect.IsMap $value -}}
+ {{- with $value.weight -}}
+ {{- $social = dict "Weight" . | merge $social -}}
{{- end -}}
- {{- range sort $socialArr "Weight" -}}
- {{- partial "plugin/social.html" . -}}
+ {{- with $value.prefix -}}
+ {{- $social = dict "Prefix" . | merge $social -}}
{{- end -}}
-
- {{- end -}}
+ {{- with $value.template -}}
+ {{- $social = dict "Template" . | merge $social -}}
+ {{- end -}}
+ {{- with $value.id -}}
+ {{- $social = dict "Id" . | merge $social -}}
+ {{- end -}}
+ {{- with $value.url -}}
+ {{- $social = dict "Url" . | merge $social -}}
+ {{- end -}}
+ {{- with $value.title -}}
+ {{- $social = dict "Title" . | merge $social -}}
+ {{- end -}}
+ {{- with $value.newtab -}}
+ {{- $social = dict "Newtab" . | merge $social -}}
+ {{- end -}}
+ {{- with $value.icon -}}
+ {{- $social = dict "Icon" . | merge $social -}}
+ {{- end -}}
+ {{- else if ne $value true -}}
+ {{- $social = dict "Id" $value | merge $social -}}
+ {{- end -}}
+ {{- if $social.Icon.Simpleicons -}}
+ {{- $prefix := ($.Scratch.Get "cdn" | default dict).simpleIconsPrefix -}}
+ {{- $social = dict "Prefix" $prefix | dict "Icon" | merge $social -}}
+ {{- end -}}
+ {{- $socialArr = $socialArr | append $social -}}
+ {{- end -}}
+ {{- end -}}
+ {{- range sort $socialArr "Weight" -}}
+ {{- partial "plugin/social.html" . -}}
+ {{- end -}}
+
+ {{- end -}}
- {{- with $profile.disclaimer -}}
-
- {{- . | safeHTML -}}
-
- {{- end -}}
+ {{- with $profile.disclaimer -}}
+
+ {{- . | safeHTML -}}
+
+ {{- end -}}
diff --git a/layouts/partials/init.html b/layouts/partials/init.html
index 28fdd77f..9b76da9b 100644
--- a/layouts/partials/init.html
+++ b/layouts/partials/init.html
@@ -3,36 +3,36 @@
{{- /* FixIt theme version detection */ -}}
{{- $VERSION := "0.2.X" -}}
{{- if eq .Site .Sites.First -}}
- {{- if not .Site.Params.version -}}
- {{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the FixIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration\n你还没有正确配置 FixIt 的版本参数. 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
- {{- else if ne .Site.Params.version $VERSION -}}
- {{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/Lruihao/FixIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/Lruihao/FixIt/releases\n" .Site.Params.version $VERSION) -}}
- {{- end -}}
+ {{- if not .Site.Params.version -}}
+ {{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the FixIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration\n你还没有正确配置 FixIt 的版本参数. 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
+ {{- else if ne .Site.Params.version $VERSION -}}
+ {{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/Lruihao/FixIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/Lruihao/FixIt/releases\n" .Site.Params.version $VERSION) -}}
+ {{- end -}}
{{- end -}}
{{- $params := .Params | merge .Site.Params.page -}}
{{- if eq hugo.Environment "production" -}}
- {{- $cdn := .Site.Params.cdn -}}
- {{- with $cdn.data -}}
- {{- $cdnData := printf "data/cdn/%v" . | resources.Get | transform.Unmarshal -}}
- {{- $cdn = dict "simpleIconsPrefix" $cdnData.prefix.simpleIcons -}}
- {{- $prefix := $cdnData.prefix.libFiles | default "" -}}
- {{- range $key, $value := $cdnData.libFiles -}}
- {{- $cdn = printf "%v%v" $prefix $value | dict $key | merge $cdn -}}
- {{- end -}}
- {{- end -}}
- {{- .Scratch.Set "cdn" $cdn -}}
- {{- .Scratch.Set "fingerprint" .Site.Params.fingerprint -}}
- {{- .Scratch.Set "analytics" .Site.Params.analytics -}}
- {{- .Scratch.Set "comment" $params.comment -}}
- {{- if eq .Params.comment true -}}
- {{- .Scratch.Set "comment" .Site.Params.comment -}}
- {{- else if eq .Params.comment false -}}
- {{- .Scratch.Set "comment" dict -}}
+ {{- $cdn := .Site.Params.cdn -}}
+ {{- with $cdn.data -}}
+ {{- $cdnData := printf "data/cdn/%v" . | resources.Get | transform.Unmarshal -}}
+ {{- $cdn = dict "simpleIconsPrefix" $cdnData.prefix.simpleIcons -}}
+ {{- $prefix := $cdnData.prefix.libFiles | default "" -}}
+ {{- range $key, $value := $cdnData.libFiles -}}
+ {{- $cdn = printf "%v%v" $prefix $value | dict $key | merge $cdn -}}
{{- end -}}
+ {{- end -}}
+ {{- .Scratch.Set "cdn" $cdn -}}
+ {{- .Scratch.Set "fingerprint" .Site.Params.fingerprint -}}
+ {{- .Scratch.Set "analytics" .Site.Params.analytics -}}
+ {{- .Scratch.Set "comment" $params.comment -}}
+ {{- if eq .Params.comment true -}}
+ {{- .Scratch.Set "comment" .Site.Params.comment -}}
+ {{- else if eq .Params.comment false -}}
+ {{- .Scratch.Set "comment" dict -}}
+ {{- end -}}
{{- else if eq .Site .Sites.First -}}
- {{- warnf "\n\nCurrent environment is \"development\". The \"comment system\", \"CDN\" and \"fingerprint\" will be disabled.\n当前运行环境是 \"development\". \"评论系统\", \"CDN\" 和 \"fingerprint\" 不会启用.\n" -}}
+ {{- warnf "\n\nCurrent environment is \"development\". The \"comment system\", \"CDN\" and \"fingerprint\" will be disabled.\n当前运行环境是 \"development\". \"评论系统\", \"CDN\" 和 \"fingerprint\" 不会启用.\n" -}}
{{- end -}}
{{- .Scratch.Set "params" $params -}}
diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html
index 170144fb..9eb7c25c 100644
--- a/layouts/partials/paginator.html
+++ b/layouts/partials/paginator.html
@@ -1,30 +1,30 @@
{{- if gt .Paginator.TotalPages 1 -}}
-
+
{{- end -}}
diff --git a/layouts/partials/plugin/analytics.html b/layouts/partials/plugin/analytics.html
index c4c21fad..f08e85a1 100644
--- a/layouts/partials/plugin/analytics.html
+++ b/layouts/partials/plugin/analytics.html
@@ -1,22 +1,22 @@
{{- $analytics := .Scratch.Get "analytics" | default dict -}}
{{- if $analytics.enable -}}
- {{- /* Google Analytics */ -}}
- {{- with $analytics.google.id -}}
-
- {{- printf "https://www.googletagmanager.com/gtag/js?id=%v" . | dict "Async" true "Source" | partial "plugin/script.html" -}}
- {{- end -}}
+ {{- /* Google Analytics */ -}}
+ {{- with $analytics.google.id -}}
+
+ {{- printf "https://www.googletagmanager.com/gtag/js?id=%v" . | dict "Async" true "Source" | partial "plugin/script.html" -}}
+ {{- end -}}
- {{- /* Fathom Analytics */ -}}
- {{- with $analytics.fathom.id -}}
-
- {{- dict "Source" ($analytics.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "Async" true "Attr" "id=fathom-script" | partial "plugin/script.html" -}}
- {{- end -}}
+ {{- /* Fathom Analytics */ -}}
+ {{- with $analytics.fathom.id -}}
+
+ {{- dict "Source" ($analytics.fathom.server | default "cdn.usefathom.com" | printf "https://%v/tracker.js") "Async" true "Attr" "id=fathom-script" | partial "plugin/script.html" -}}
+ {{- end -}}
{{- end -}}
diff --git a/layouts/partials/plugin/cardlink.html b/layouts/partials/plugin/cardlink.html
index 2fa65d1b..464d7ee3 100644
--- a/layouts/partials/plugin/cardlink.html
+++ b/layouts/partials/plugin/cardlink.html
@@ -4,17 +4,17 @@
- {{- with .Content -}}
- {{- . | safeHTML -}}
- {{- end -}}
+ {{- with .Content -}}
+ {{- . | safeHTML -}}
+ {{- end -}}
-
-
-
- {{ .Destination | safeURL }}
+
+
+
+ {{ .Destination | safeURL }}
diff --git a/layouts/partials/plugin/compatibility.html b/layouts/partials/plugin/compatibility.html
index b460f185..46822cc2 100644
--- a/layouts/partials/plugin/compatibility.html
+++ b/layouts/partials/plugin/compatibility.html
@@ -4,19 +4,19 @@
{{- /* Polyfill.io */ -}}
{{- if $compatibility.polyfill -}}
- {{- $features := slice -}}
- {{- range resources.Get "data/polyfill.yml" | transform.Unmarshal -}}
- {{- range . -}}
- {{- $features = $features | append . -}}
- {{- end -}}
- {{- end -}}
- {{- with $features | uniq -}}
- {{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%v" | dict "Source" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
+ {{- $features := slice -}}
+ {{- range resources.Get "data/polyfill.yml" | transform.Unmarshal -}}
+ {{- range . -}}
+ {{- $features = $features | append . -}}
{{- end -}}
+ {{- end -}}
+ {{- with $features | uniq -}}
+ {{- delimit . "%2C" | printf "https://polyfill.io/v3/polyfill.min.js?features=%v" | dict "Source" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
+ {{- end -}}
{{- end -}}
{{- /* object-fit-images */ -}}
{{- if $compatibility.objectFit -}}
- {{- $source := $cdn.objectFitImagesJS | default "lib/object-fit-images/ofi.min.js" -}}
- {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
+ {{- $source := $cdn.objectFitImagesJS | default "lib/object-fit-images/ofi.min.js" -}}
+ {{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- end -}}
diff --git a/layouts/partials/plugin/icon.html b/layouts/partials/plugin/icon.html
index 5bc2a11f..bd28a127 100644
--- a/layouts/partials/plugin/icon.html
+++ b/layouts/partials/plugin/icon.html
@@ -1,13 +1,13 @@
{{- with .Class -}}
-
+
{{- else -}}
- {{- $src := .Src -}}
- {{- with .Simpleicons -}}
- {{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}}
- {{- $src = printf "%v/%v.svg" $prefix . -}}
- {{- end -}}
- {{- if (urls.Parse $src).Host | not -}}
- {{- $src = (resources.Get $src | minify).RelPermalink -}}
- {{- end -}}
-
+ {{- $src := .Src -}}
+ {{- with .Simpleicons -}}
+ {{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}}
+ {{- $src = printf "%v/%v.svg" $prefix . -}}
+ {{- end -}}
+ {{- if (urls.Parse $src).Host | not -}}
+ {{- $src = (resources.Get $src | minify).RelPermalink -}}
+ {{- end -}}
+
{{- end -}}
diff --git a/layouts/partials/plugin/image.html b/layouts/partials/plugin/image.html
index 84a61b3e..3a6514db 100644
--- a/layouts/partials/plugin/image.html
+++ b/layouts/partials/plugin/image.html
@@ -1,38 +1,38 @@
{{- /* lazysizes and lightgallery.js */ -}}
{{- $src := .Src -}}
{{- with dict "Path" .Src "Resources" .Resources | partial "function/resource.html" -}}
- {{- $src = .RelPermalink -}}
+ {{- $src = .RelPermalink -}}
{{- end -}}
{{- $small := .SrcSmall | default $src -}}
{{- with dict "Path" .SrcSmall "Resources" .Resources | partial "function/resource.html" -}}
- {{- $small = .RelPermalink -}}
+ {{- $small = .RelPermalink -}}
{{- end -}}
{{- $large := .SrcLarge | default $src -}}
{{- with dict "Path" .SrcLarge "Resources" .Resources | partial "function/resource.html" -}}
- {{- $large = .RelPermalink -}}
+ {{- $large = .RelPermalink -}}
{{- end -}}
{{- $alt := .Alt | default $src -}}
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
{{- if .Linked -}}
-
-
-
-{{- else -}}
+
+ class="lazyload{{ with .Class }} {{ . }}{{ end }}"
+ src="{{ $loading.RelPermalink }}"
+ data-src="{{ .Src | safeURL }}"
+ data-srcset="{{ $small | safeURL }}, {{ .Src | safeURL }} 1.5x, {{ $large | safeURL }} 2x"
+ data-sizes="auto"
+ alt="{{ $alt }}"{{ with .Height }} height="{{ . }}"{{ end }}{{ with .Width }} width="{{ . }}"{{ end }} />
+
+{{- else -}}
+
{{- end -}}
diff --git a/layouts/partials/plugin/link.html b/layouts/partials/plugin/link.html
index ceaefc62..8fb7ff4e 100644
--- a/layouts/partials/plugin/link.html
+++ b/layouts/partials/plugin/link.html
@@ -1,9 +1,9 @@
{{- $rel := "" -}}
- {{- with .Icon -}}
- {{- partial "plugin/icon.html" . -}}
- {{- end -}}
- {{- with .Content -}}
- {{- . | safeHTML -}}
- {{- end -}}
+ {{- with .Icon -}}
+ {{- partial "plugin/icon.html" . -}}
+ {{- end -}}
+ {{- with .Content -}}
+ {{- . | safeHTML -}}
+ {{- end -}}
\ No newline at end of file
diff --git a/layouts/partials/plugin/script.html b/layouts/partials/plugin/script.html
index e12e74e2..cb4ea122 100644
--- a/layouts/partials/plugin/script.html
+++ b/layouts/partials/plugin/script.html
@@ -1,25 +1,25 @@
{{- if .Content -}}
-
+
{{- else if strings.HasPrefix .Source "
+ {{- if .Minify -}}
+ {{- $resource = $resource | minify -}}
+ {{- end -}}
+ {{- with .Fingerprint -}}
+ {{- $resource = $resource | fingerprint . -}}
+ {{- $integrity = $resource.Data.Integrity -}}
+ {{- end -}}
+ {{- $src = $resource.RelPermalink -}}
+ {{- end -}}
+
{{- end -}}
diff --git a/layouts/partials/plugin/share.html b/layouts/partials/plugin/share.html
index 941647cb..a3e94ef2 100644
--- a/layouts/partials/plugin/share.html
+++ b/layouts/partials/plugin/share.html
@@ -1,199 +1,199 @@
{{- $share := (.Scratch.Get "params").share | default dict -}}
{{- if $share.enable -}}
- {{- /* 001: Twitter */ -}}
- {{- if $share.Twitter -}}
-
- {{- dict "Class" "fab fa-twitter fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 001: Twitter */ -}}
+ {{- if $share.Twitter -}}
+
+ {{- dict "Class" "fab fa-twitter fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 002: Facebook */ -}}
- {{- if $share.Facebook -}}
-
- {{- dict "Class" "fab fa-facebook-square fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 002: Facebook */ -}}
+ {{- if $share.Facebook -}}
+
+ {{- dict "Class" "fab fa-facebook-square fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 003: Linkedin */ -}}
- {{- if $share.Linkedin -}}
-
- {{- dict "Class" "fab fa-linkedin fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 003: Linkedin */ -}}
+ {{- if $share.Linkedin -}}
+
+ {{- dict "Class" "fab fa-linkedin fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 004: WhatsApp */ -}}
- {{- if $share.Whatsapp -}}
-
- {{- dict "Class" "fab fa-whatsapp fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 004: WhatsApp */ -}}
+ {{- if $share.Whatsapp -}}
+
+ {{- dict "Class" "fab fa-whatsapp fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 005: Viber */ -}}
- {{- if $share.Viber -}}
-
- {{- dict "Class" "fab fa-viber fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 005: Viber */ -}}
+ {{- if $share.Viber -}}
+
+ {{- dict "Class" "fab fa-viber fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 006: Pinterest */ -}}
- {{- if $share.Pinterest -}}
-
- {{- dict "Class" "fab fa-pinterest fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 006: Pinterest */ -}}
+ {{- if $share.Pinterest -}}
+
+ {{- dict "Class" "fab fa-pinterest fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 007: Tumblr */ -}}
- {{- if $share.Tumblr -}}
-
- {{- dict "Class" "fab fa-tumblr fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 007: Tumblr */ -}}
+ {{- if $share.Tumblr -}}
+
+ {{- dict "Class" "fab fa-tumblr fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 008: Hacker News */ -}}
- {{- if $share.Hackernews -}}
-
- {{- dict "Class" "fab fa-hacker-news fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 008: Hacker News */ -}}
+ {{- if $share.Hackernews -}}
+
+ {{- dict "Class" "fab fa-hacker-news fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 009: Reddit */ -}}
- {{- if $share.Reddit -}}
-
- {{- dict "Class" "fab fa-reddit fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 009: Reddit */ -}}
+ {{- if $share.Reddit -}}
+
+ {{- dict "Class" "fab fa-reddit fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 010: VK */ -}}
- {{- if $share.VK -}}
-
- {{- dict "Class" "fab fa-vk fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 010: VK */ -}}
+ {{- if $share.VK -}}
+
+ {{- dict "Class" "fab fa-vk fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 011: Buffer */ -}}
- {{- if $share.Buffer -}}
-
- {{- dict "Class" "fab fa-buffer fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 011: Buffer */ -}}
+ {{- if $share.Buffer -}}
+
+ {{- dict "Class" "fab fa-buffer fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 012: Xing */ -}}
- {{- if $share.Xing -}}
-
- {{- dict "Class" "fab fa-xing fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 012: Xing */ -}}
+ {{- if $share.Xing -}}
+
+ {{- dict "Class" "fab fa-xing fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 013: Line */ -}}
- {{- if $share.Line -}}
-
- {{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 013: Line */ -}}
+ {{- if $share.Line -}}
+
+ {{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 014: Instapaper */ -}}
- {{- if $share.Instapaper -}}
-
- {{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 014: Instapaper */ -}}
+ {{- if $share.Instapaper -}}
+
+ {{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 015: Pocket */ -}}
- {{- if $share.Pocket -}}
-
- {{- dict "Class" "fab fa-get-pocket fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 015: Pocket */ -}}
+ {{- if $share.Pocket -}}
+
+ {{- dict "Class" "fab fa-get-pocket fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 016: Digg */ -}}
- {{- if $share.Digg -}}
-
- {{- dict "Class" "fab fa-digg fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 016: Digg */ -}}
+ {{- if $share.Digg -}}
+
+ {{- dict "Class" "fab fa-digg fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 017: StumbleUpon */ -}}
- {{- if $share.Stumbleupon -}}
-
- {{- dict "Class" "fab fa-stumbleupon fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 017: StumbleUpon */ -}}
+ {{- if $share.Stumbleupon -}}
+
+ {{- dict "Class" "fab fa-stumbleupon fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 018: Flipboard */ -}}
- {{- if $share.Flipboard -}}
-
- {{- dict "Class" "fab fa-flipboard fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 018: Flipboard */ -}}
+ {{- if $share.Flipboard -}}
+
+ {{- dict "Class" "fab fa-flipboard fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 019: 微博 */ -}}
- {{- if $share.Weibo -}}
-
- {{- dict "Class" "fab fa-weibo fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 019: 微博 */ -}}
+ {{- if $share.Weibo -}}
+
+ {{- dict "Class" "fab fa-weibo fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 020: 人人 */ -}}
- {{- if $share.Renren -}}
-
- {{- dict "Class" "fab fa-renren fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 020: 人人 */ -}}
+ {{- if $share.Renren -}}
+
+ {{- dict "Class" "fab fa-renren fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 021: Myspace */ -}}
- {{- if $share.Myspace -}}
-
- {{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 021: Myspace */ -}}
+ {{- if $share.Myspace -}}
+
+ {{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 022: Blogger */ -}}
- {{- if $share.Blogger -}}
-
- {{- dict "Class" "fab fa-blogger fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 022: Blogger */ -}}
+ {{- if $share.Blogger -}}
+
+ {{- dict "Class" "fab fa-blogger fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 023: 百度 */ -}}
- {{- if $share.Baidu -}}
-
- {{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 023: 百度 */ -}}
+ {{- if $share.Baidu -}}
+
+ {{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 024: OK.RU */ -}}
- {{- if $share.Odnoklassniki -}}
-
- {{- dict "Class" "fab fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 024: OK.RU */ -}}
+ {{- if $share.Odnoklassniki -}}
+
+ {{- dict "Class" "fab fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 025: Evernote */ -}}
- {{- if $share.Evernote -}}
-
- {{- dict "Class" "fab fa-evernote fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 025: Evernote */ -}}
+ {{- if $share.Evernote -}}
+
+ {{- dict "Class" "fab fa-evernote fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 026: Skype */ -}}
- {{- if $share.Skype -}}
-
- {{- dict "Class" "fab fa-skype fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 026: Skype */ -}}
+ {{- if $share.Skype -}}
+
+ {{- dict "Class" "fab fa-skype fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 027: Trello */ -}}
- {{- if $share.Trello -}}
-
- {{- dict "Class" "fab fa-trello fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 027: Trello */ -}}
+ {{- if $share.Trello -}}
+
+ {{- dict "Class" "fab fa-trello fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
- {{- /* 028: Mix */ -}}
- {{- if $share.Mix -}}
-
- {{- dict "Class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}}
-
- {{- end -}}
+ {{- /* 028: Mix */ -}}
+ {{- if $share.Mix -}}
+
+ {{- dict "Class" "fab fa-mix fa-fw" | partial "plugin/icon.html" -}}
+
+ {{- end -}}
{{- end -}}
diff --git a/layouts/partials/plugin/social.html b/layouts/partials/plugin/social.html
index e6d20054..1d75597f 100644
--- a/layouts/partials/plugin/social.html
+++ b/layouts/partials/plugin/social.html
@@ -1,11 +1,11 @@
{{- $destination := "" -}}
{{- with .Url -}}
- {{- $destination = . | relLangURL -}}
+ {{- $destination = . | relLangURL -}}
{{- else -}}
- {{- $template := .Template | default "%v" -}}
- {{- with .Prefix -}}
- {{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}}
- {{- end -}}
- {{- $destination = printf (string $template) .Id -}}
+ {{- $template := .Template | default "%v" -}}
+ {{- with .Prefix -}}
+ {{- $template = . | strings.TrimSuffix "/" | printf "%v/%%v" -}}
+ {{- end -}}
+ {{- $destination = printf (string $template) .Id -}}
{{- end -}}
{{- dict "Destination" $destination "Rel" "me" | merge . | partial "plugin/link.html" -}}
diff --git a/layouts/partials/plugin/style.html b/layouts/partials/plugin/style.html
index 9c9c9895..103a1a0f 100644
--- a/layouts/partials/plugin/style.html
+++ b/layouts/partials/plugin/style.html
@@ -1,31 +1,31 @@
{{- if strings.HasPrefix .Source "
+ {{- with .Fingerprint -}}
+ {{- $resource = $resource | fingerprint . -}}
+ {{- $integrity = $resource.Data.Integrity -}}
+ {{- end -}}
+ {{- $href = $resource.RelPermalink -}}
+ {{- end -}}
+
{{- end -}}
diff --git a/layouts/partials/rss/item.html b/layouts/partials/rss/item.html
index ea08a6e0..0ee42a96 100644
--- a/layouts/partials/rss/item.html
+++ b/layouts/partials/rss/item.html
@@ -1,36 +1,36 @@
{{- $params := .Page.Params | merge .Site.Params.Page | merge (dict "author" .Site.Author.name) -}}
-
-
- {{- .Page.Title -}}
-
-
- {{- .Page.Permalink -}}
-
-
- {{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
-
-
- {{- $params.author | default (T "author") -}}
-
-
- {{- .Page.Permalink -}}
-
-
- {{- "
-
-
- {{- end -}}
- {{- $content := .Page.Description -}}
- {{- if $params.rssFullText -}}
- {{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
- {{- else -}}
- {{- with .Page.Summary -}}
- {{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
- {{- end -}}
- {{- end -}}
- {{- $content | replaceRE `