+ {{- range site.Params.socialIcons }}
+
{{ partial "svg.html" . }}
{{- end }}
diff --git a/themes/PaperMod/layouts/partials/svg.html b/themes/PaperMod/layouts/partials/svg.html
index cc80839..56e9648 100644
--- a/themes/PaperMod/layouts/partials/svg.html
+++ b/themes/PaperMod/layouts/partials/svg.html
@@ -29,6 +29,17 @@
+{{- else if or (eq $icon_name "ao3") (eq $icon_name "archiveofourown") -}}
+
+
+
+
+
+
+{{- else if (eq $icon_name "bandcamp") -}}
+
+
+
{{- else if (eq $icon_name "behance") -}}
@@ -49,11 +60,31 @@
+{{- else if (eq $icon_name "bluesky") -}}
+
+
+
{{- else if (eq $icon_name "bugcrowd") -}}
+{{- else if (eq $icon_name "buttondown") -}}
+
+
+
+
+
+
+
+
+
+
{{- else if (eq $icon_name "buymeacoffee") -}}
{{- else if (eq $icon_name "discord") -}}
-
+
-
+ d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" />
{{- else if (eq $icon_name "douban") -}}
+{{- else if (eq $icon_name "exercism") -}}
+
+
+
+
{{- else if (eq $icon_name "facebook") -}}
+{{- else if (eq $icon_name "fediverse") -}}
+
+
+
{{- else if (eq $icon_name "firefish") -}}
@@ -225,6 +276,10 @@
+{{- else if (eq $icon_name "git") -}}
+
+
+
{{- else if (eq $icon_name "gitea") -}}
+{{- else if (eq $icon_name "juejin") -}}
+
+
+
{{- else if (eq $icon_name "kaggle") -}}
@@ -342,6 +401,10 @@
+{{- else if (eq $icon_name "keyoxide") -}}
+
+
+
{{- else if (eq $icon_name "kofi") -}}
+{{- else if (eq $icon_name "raycast") -}}
+
+
+
{{- else if (eq $icon_name "researchgate") -}}
@@ -561,6 +629,11 @@
d="M8.7 14.1c-1.4-.8-2.7-1.5-4.1-2.3C2.2 10.3 1 8.2 1.3 5.3 1.6 2.3 4.1.1 7.1 0h11c2.6 0 4.6 2.2 4.7 4.7 0 2.6-2 4.8-4.6 4.9h-2.8v.2c.2.2.5.3.7.5 1.2.7 2.4 1.3 3.6 2 2.5 1.5 3.7 4.5 2.9 7.2-.8 2.7-3.1 4.3-6.1 4.4H5.9c-2.4 0-4.3-1.9-4.6-4.3-.3-2.3 1.2-4.5 3.5-5.1.6-.1 1.2-.1 1.7-.2h2.1s.1-.1.1-.2zm4.2-3.8c-.1.3-.2.3-.2.4v3.9c0 1.1-.1 1.2-1.2 1.2H6.4c-.4 0-.9 0-1.3.1-1.6.4-2.5 1.9-2.4 3.6.2 1.6 1.6 2.9 3.3 2.9h10.5c2.1 0 3.8-1.2 4.5-3.1.7-1.8.2-4.1-1.5-5.3-2-1.3-4.3-2.4-6.6-3.7zm-1.6 3.4v-4c0-1.4.1-1.5 1.4-1.5H18c1.5 0 2.7-1 3.1-2.4.6-2.2-1-4.2-3.4-4.3H7.6c-2.4 0-4.3 1.3-4.9 3.4-.6 2.1.4 4.4 2.5 5.5 1.7 1 3.5 1.9 5.2 2.9.3.2.5.2.9.4z">
+{{- else if (eq $icon_name "signal") -}}
+
+
+
{{- else if (eq $icon_name "soundcloud") -}}
+{{- else if (eq $icon_name "tableau") -}}
+
+
+
+
+
+
+
+
+
+
{{- else if (eq $icon_name "telegram") -}}
@@ -699,12 +783,21 @@
+{{- else if (eq $icon_name "wantedly") -}}
+
+
+
{{- else if (eq $icon_name "wechat") -}}
+{{- else if (eq $icon_name "wordpress") -}}
+
+
+
{{- else if (eq $icon_name "x") -}}
{{ end -}}
-{{- else -}}
-{{- $images := $.Resources.ByType "image" -}}
-{{- $featured := $images.GetMatch "*feature*" -}}
-{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
-{{- with $featured -}}
-
-{{- else -}}
-{{- with site.Params.images }} {{ end -}}
-{{- end -}}
-{{- end -}}
+{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
+{{- range first 6 $images }}
+
+{{ end -}}
{{- end }}
{{- if .IsPage }}
@@ -41,12 +33,27 @@
{{- /* If it is part of a series, link to related articles */}}
{{- $permalink := .Permalink }}
{{- $siteSeries := site.Taxonomies.series }}
+{{- if $siteSeries }}
{{ with .Params.series }}{{- range $name := . }}
{{- $series := index $siteSeries ($name | urlize) }}
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.Permalink $permalink }} {{ end }}
{{- end }}
{{ end }}{{ end }}
+{{- end }}
+
+{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
+{{- $facebookAdmin := "" }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $facebookAdmin = .facebook_admin }}
+ {{- end }}
+{{- else }}
+ {{- with site.Social.facebook_admin }}
+ {{- $facebookAdmin = . }}
+ {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
+ {{- end }}
+{{- end }}
{{- /* Facebook Page Admin ID for Domain Insights */}}
-{{- with site.Social.facebook_admin }} {{ end }}
+{{ with $facebookAdmin }} {{ end }}
diff --git a/themes/PaperMod/layouts/partials/templates/schema_json.html b/themes/PaperMod/layouts/partials/templates/schema_json.html
index 435cba5..ed4d689 100644
--- a/themes/PaperMod/layouts/partials/templates/schema_json.html
+++ b/themes/PaperMod/layouts/partials/templates/schema_json.html
@@ -4,7 +4,7 @@
"@context": "https://schema.org",
"@type": "{{- ( site.Params.schema.publisherType | default "Organization") | title -}}",
"name": {{ site.Title }},
- "url": {{ site.BaseURL }},
+ "url": {{ site.Home.Permalink }},
"description": {{ site.Params.description | plainify | truncate 180 | safeHTML }},
"thumbnailUrl": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
"sameAs": [
@@ -18,7 +18,7 @@
{{- else if (or .IsPage .IsSection) }}
{{/* BreadcrumbList */}}
-{{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }}
+{{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }}
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
{{- $bc_list := (split $lang_url "/")}}
@@ -80,6 +80,11 @@
{{- else -}}
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
{{- end}}
+ {{- else }}
+ {{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
+ {{- with index $images 0 -}}
+ "image": {{ .Permalink }},
+ {{- end }}
{{- end -}}
"datePublished": {{ .PublishDate }},
"dateModified": {{ .Lastmod }},
diff --git a/themes/PaperMod/layouts/partials/templates/twitter_cards.html b/themes/PaperMod/layouts/partials/templates/twitter_cards.html
index bd46e37..46b0d04 100644
--- a/themes/PaperMod/layouts/partials/templates/twitter_cards.html
+++ b/themes/PaperMod/layouts/partials/templates/twitter_cards.html
@@ -6,28 +6,33 @@
{{- end}}
{{- else }}
-{{- with $.Params.images -}}
-
-
-{{ else -}}
-{{- $images := $.Resources.ByType "image" -}}
-{{- $featured := $images.GetMatch "*feature*" -}}
-{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
-{{- with $featured -}}
-
-
+{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
+{{- with index $images 0 -}}
+
+
{{- else -}}
-{{- with site.Params.images -}}
-
-
-{{ else -}}
{{- end -}}
-{{- end -}}
-{{- end }}
{{- end }}
-{{ with site.Social.twitter -}}
-
-{{ end -}}
+{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
+{{- $twitterSite := "" }}
+{{- with site.Params.social }}
+ {{- if reflect.IsMap . }}
+ {{- $twitterSite = .twitter }}
+ {{- end }}
+{{- else }}
+ {{- with site.Social.twitter }}
+ {{- $twitterSite = . }}
+ {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
+ {{- end }}
+{{- end }}
+
+{{- with $twitterSite }}
+ {{- $content := . }}
+ {{- if not (strings.HasPrefix . "@") }}
+ {{- $content = printf "@%v" $twitterSite }}
+ {{- end }}
+
+{{- end }}
diff --git a/themes/PaperMod/layouts/partials/toc.html b/themes/PaperMod/layouts/partials/toc.html
index d9b8b23..28f8694 100644
--- a/themes/PaperMod/layouts/partials/toc.html
+++ b/themes/PaperMod/layouts/partials/toc.html
@@ -71,10 +71,10 @@
{{- end -}}
{{- end }}
- {{- $header | safeHTML -}}
+ {{- $header | plainify | safeHTML -}}
{{- else }}
- {{- $header | safeHTML -}}
+ {{- $header | plainify | safeHTML -}}
{{- end -}}
{{- end -}}
diff --git a/themes/PaperMod/theme.toml b/themes/PaperMod/theme.toml
index aa26fe0..f659f5c 100644
--- a/themes/PaperMod/theme.toml
+++ b/themes/PaperMod/theme.toml
@@ -37,7 +37,7 @@ features = [
"scroll-to-top",
"search"
]
-min_version = "0.97.1"
+min_version = "0.112.4"
[author]
name = "Aditya Telange"