From e03bc919bce8fbaa359409b1c183558d950a8350 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 6 Oct 2020 09:20:21 +0530 Subject: [PATCH 001/669] Add Stale bot --- .github/stale.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..7b5f5711 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 7 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 3 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - keep +# Label to use when marking an issue as stale +staleLabel: stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false From fae1c47611e3204d08becb5e9c6e9ec707901a7a Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 6 Oct 2020 15:41:44 +0530 Subject: [PATCH 002/669] update theme meta --- theme.toml | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/theme.toml b/theme.toml index 592d009b..926792e9 100644 --- a/theme.toml +++ b/theme.toml @@ -4,11 +4,38 @@ name = "PaperMod" license = "MIT" licenselink = "https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE" -description = "A simple, clean, flexible Hugo theme" +description = "A fast, clean, responsive Hugo theme" homepage = "https://github.com/adityatelange/hugo-PaperMod" -tags = ["Responsive", "Simple", "Clean", "Light", "White", "Dark", "Blog", "PaperMod"] -features = ["Responsive", "One Column", "Blog"] -min_version = "0.57.1" +tags = [ + "responsive", + "simple", + "clean", + "light", + "dark", + "blog", + "minimalist", + "highlight.js" +] +features = [ + "responsive", + "single-column", + "blog", + "cover-image", + "table-of-contents", + "opengraph", + "highlight.js", + "favicon", + "archive", + "share-icons", + "cover", + "multilingual", + "social-icons", + "minified-assets", + "theme-toggle", + "menu-location-indicator", + "scroll-to-top" +] +min_version = "0.74.0" [author] name = "Aditya Telange" From 82e9b29bf4092ad3d5e1fdf81380e9d465e0e333 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 8 Oct 2020 09:21:57 +0530 Subject: [PATCH 003/669] post-cover: fix strange `/./ ` in cover image url #13 --- layouts/_default/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 97821ccd..a4c847f5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -31,7 +31,7 @@ {{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }} {{ .Params.cover.alt | plainify }} {{- else}} - {{ .Params.cover.alt | plainify }} + {{ .Params.cover.alt | plainify }} {{- end}}

{{.Params.cover.caption | markdownify }}

From 724e73facbcc860f0c5e25f528bda4ac43ff82f7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 8 Oct 2020 14:27:43 +0530 Subject: [PATCH 004/669] social-icons: add buymeacoffee icon * icon belongs to buymeacoffee.com * edited to fit dual-tone theme --- layouts/partials/svg.html | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 30722642..58fbe422 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -19,6 +19,44 @@ style="font-variation-settings:normal" d="M1.774 18.063V5.466h5.51c1.978 0 3.116 1.326 3.055 2.806-.043 1.049-.711 2.988-2.643 2.988h-5.93H7.73c1.224 0 3.532 1.13 3.532 3.532 0 2.4-1.873 3.27-3.318 3.27zm12.57-4.459h7.89s.012-4.18-4.167-4.18c-5.237 0-5.277 9.11-.3 9.11 3.06 0 3.935-1.806 3.935-1.806M15.526 5.823h4.987" /> +{{- else if (eq .name "buymeacoffee") -}} + + + + + + + + + + + + + + + + {{- else if (eq .name "codepen") -}} From 2c7cffb617dd925d1e69432a34f6987314c2b8c1 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 8 Oct 2020 15:50:20 +0530 Subject: [PATCH 005/669] home-info: let content show upto 5 lines * previously 3 --- assets/css/post-entry.css | 4 ++++ layouts/partials/home_info.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index 340ffac6..532855b5 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -36,6 +36,10 @@ font-size: 14px; } +.home-info .entry-content { + -webkit-line-clamp: 5; +} + .post-entry { position: relative; margin-bottom: var(--gap); diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html index 7feb43a1..6be21134 100644 --- a/layouts/partials/home_info.html +++ b/layouts/partials/home_info.html @@ -1,5 +1,5 @@ {{- with $.Site.Params.homeInfoParams }} -
+

{{- .Title }}

From 46bf0538c94fae9d42433a75849757bbed73b40f Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:24:48 +0530 Subject: [PATCH 006/669] post-tags(css): highlight tags with a slim border --- assets/css/post-single.css | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index dc645258..e472704c 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -276,6 +276,7 @@ line-height: 34px; background: var(--code-bg); border-radius: 4px; + border: 1px solid var(--tertiary); } .post-tags a:hover { From f933372c55a21e9f2ba16c7cdf91407b9d9542a9 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:34:13 +0530 Subject: [PATCH 007/669] terms: fix unreachable code in taxonomy list --- layouts/_default/list.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4a998d3c..d788753e 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -17,7 +17,7 @@ {{- end}} {{ $paginator := .Paginate $pages }} - +{{ $term := .Data.Term}} {{- range $index, $page := $paginator.Pages }} {{- $class := "post-entry" }} @@ -27,7 +27,7 @@ {{- else}} {{- $class = "first-entry" }} {{- end }} -{{- else if .Data.Term }} +{{- else if $term }} {{- $class = "post-entry tag-entry" }} {{- end }}
From e04e248ae1059d451976e75a48c3b6e13e33a9a8 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:40:37 +0530 Subject: [PATCH 008/669] terms: hide cover image in taxonomy list, show others * taxonomies are meant to be browsed faster --- assets/css/post-entry.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index 532855b5..074e4b64 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -53,8 +53,7 @@ transform: scale(0.96); } -.tag-entry .entry-content, -.tag-entry .entry-footer { +.tag-entry .entry-cover { display: none; } From 3ca79f59fecf0e5473d9e8658f458a31dac35b33 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:41:44 +0530 Subject: [PATCH 009/669] post-cover: fix strange `/./ ` in cover image url 2 #13 --- layouts/_default/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d788753e..474d7f76 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -36,7 +36,7 @@ {{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }} {{ .Params.cover.alt | plainify }} {{- else}} - {{ .Params.cover.alt | plainify }} + {{ .Params.cover.alt | plainify }} {{- end}} {{- end }} From a8abbd35452e6a98777e8a618114b0147368d98e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 10 Oct 2020 19:52:08 +0530 Subject: [PATCH 010/669] post-cover: relative covers need to be explicitely set * change in d819914 and #13 * previous impl breks sites not using `/static` dir as their static location * hugo supports multiple static directories and previous impl checks only for one * ref : https://gohugo.io/content-management/static-files/ usage change in post-vars => cover: image: '' relative: true --- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 474d7f76..0b2f0f3c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -33,7 +33,7 @@
{{- if .Params.cover.image }}
- {{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }} + {{- if (ne .Params.cover.relative true) }} {{ .Params.cover.alt | plainify }} {{- else}} {{ .Params.cover.alt | plainify }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a4c847f5..ef5d6f3e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -28,7 +28,7 @@ {{- if .Params.cover.image }}
- {{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }} + {{- if (ne .Params.cover.relative true) }} {{ .Params.cover.alt | plainify }} {{- else}} {{ .Params.cover.alt | plainify }} From 6c4e094c91ce143f3895550a28cf0b8057c23e57 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 11 Oct 2020 16:31:13 +0530 Subject: [PATCH 011/669] templates: Add Twitter Cards, OpenGraph, Schema This code is licensed under Apache License 2.0 and is part of https://github.com/gohugoio/hugo --- layouts/partials/templates/opengraph.html | 57 +++++++++++++++++++ layouts/partials/templates/schema.html | 23 ++++++++ layouts/partials/templates/twitter_cards.html | 29 ++++++++++ 3 files changed, 109 insertions(+) create mode 100644 layouts/partials/templates/opengraph.html create mode 100644 layouts/partials/templates/schema.html create mode 100644 layouts/partials/templates/twitter_cards.html diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html new file mode 100644 index 00000000..07d9775d --- /dev/null +++ b/layouts/partials/templates/opengraph.html @@ -0,0 +1,57 @@ + + + + +{{ with $.Params.images }}{{ range first 6 . -}} + +{{ 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 }} + +{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} +{{- if .IsPage }} +{{- if not .PublishDate.IsZero }} +{{ else if not .Date.IsZero }} +{{ end }} +{{- if not .Lastmod.IsZero }}{{ end }} +{{- else }} +{{- if not .Date.IsZero }} +{{- end }} +{{- end }}{{/* .IsPage */}} + +{{- with .Params.audio }}{{ end }} +{{- with .Params.locale }}{{ end }} +{{- with .Site.Params.title }}{{ end }} +{{- with .Params.videos }} +{{- range . }} + +{{ end }}{{ end }} + +{{- /* If it is part of a series, link to related articles */}} +{{- $permalink := .Permalink }} +{{- $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }} +{{- range $name := . }} + {{- $series := index $siteSeries $name }} + {{- range $page := first 6 $series.Pages }} + {{- if ne $page.Permalink $permalink }}{{ end }} + {{- end }} +{{ end }}{{ end }} + +{{- if .IsPage }} +{{- range .Site.Authors }}{{ with .Social.facebook }} +{{ end }}{{ with .Site.Social.facebook }} +{{ end }} + +{{- with .Params.tags }}{{ range first 6 . }} +{{ end }}{{ end }} +{{- end }}{{ end }} + +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{- with .Site.Social.facebook_admin }}{{ end }} diff --git a/layouts/partials/templates/schema.html b/layouts/partials/templates/schema.html new file mode 100644 index 00000000..0cbae153 --- /dev/null +++ b/layouts/partials/templates/schema.html @@ -0,0 +1,23 @@ + + + +{{- if .IsPage }}{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}{{ if not .PublishDate.IsZero }} +{{ end }} +{{ if not .Lastmod.IsZero }}{{ end }} + +{{ with $.Params.images }}{{ range first 6 . -}} + +{{ 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 }} + + + +{{- end }} diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html new file mode 100644 index 00000000..cbe2430b --- /dev/null +++ b/layouts/partials/templates/twitter_cards.html @@ -0,0 +1,29 @@ +{{- with $.Params.images -}} + + +{{ 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 -}} + + +{{ else -}} + +{{- end -}} +{{- end -}} +{{- end }} + + +{{ with .Site.Social.twitter -}} + +{{ end -}} +{{ range .Site.Authors }} +{{ with .twitter -}} + +{{ end -}} +{{ end -}} \ No newline at end of file From 4a4d0c009c988e657134253732757b8be4885c7a Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 11 Oct 2020 21:04:17 +0530 Subject: [PATCH 012/669] templates: add cover image to be linked into meta for opengraph, schema and twitter --- layouts/partials/templates/opengraph.html | 7 +++++++ layouts/partials/templates/schema.html | 7 +++++++ layouts/partials/templates/twitter_cards.html | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 07d9775d..48ad5ebf 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -2,6 +2,13 @@ +{{- if .Params.cover.image -}} +{{- if (ne .Params.cover.relative true) }} + +{{- else}} + +{{- end}} +{{- end }} {{ with $.Params.images }}{{ range first 6 . -}} {{ end }}{{ else -}} diff --git a/layouts/partials/templates/schema.html b/layouts/partials/templates/schema.html index 0cbae153..e01dc483 100644 --- a/layouts/partials/templates/schema.html +++ b/layouts/partials/templates/schema.html @@ -5,6 +5,13 @@ {{ end }} {{ if not .Lastmod.IsZero }}{{ end }} +{{- if .Params.cover.image -}} +{{- if (ne .Params.cover.relative true) }} + +{{- else}} + +{{- end}} +{{- end }} {{ with $.Params.images }}{{ range first 6 . -}} {{ end }}{{ else -}} diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index cbe2430b..2b3b7c96 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -1,3 +1,11 @@ +{{- if .Params.cover.image -}} + +{{- if (ne $.Params.cover.relative true) }} + +{{- else }} + +{{- end}} +{{ end }} {{- with $.Params.images -}} From 306889f68bcbaae0789bc9dc4c5578c2ddc348af Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 11 Oct 2020 21:08:44 +0530 Subject: [PATCH 013/669] head: link custom templates for social meta --- layouts/partials/head.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9d1a43f1..55fa1328 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -49,7 +49,7 @@ {{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} {{- template "_internal/google_analytics_async.html" . }} -{{- template "_internal/opengraph.html" . }} -{{- template "_internal/twitter_cards.html" . }} -{{- template "_internal/schema.html" . }} +{{- template "partials/templates/opengraph.html" . }} +{{- template "partials/templates/twitter_cards.html" . }} +{{- template "partials/templates/schema.html" . }} {{- end }} \ No newline at end of file From 23636ab3260ea41354d7ee560f8848e1c684ec6d Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 12 Oct 2020 17:26:45 +0530 Subject: [PATCH 014/669] templates: social-meta: prefer cover image over other images --- layouts/partials/templates/opengraph.html | 3 ++- layouts/partials/templates/schema.html | 3 ++- layouts/partials/templates/twitter_cards.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index 48ad5ebf..834e3a12 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -8,7 +8,7 @@ {{- else}} {{- end}} -{{- end }} +{{- else }} {{ with $.Params.images }}{{ range first 6 . -}} {{ end }}{{ else -}} @@ -21,6 +21,7 @@ {{- with $.Site.Params.images -}} {{ end }}{{ end }}{{ end }} +{{- end }} {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} {{- if .IsPage }} diff --git a/layouts/partials/templates/schema.html b/layouts/partials/templates/schema.html index e01dc483..6c032b66 100644 --- a/layouts/partials/templates/schema.html +++ b/layouts/partials/templates/schema.html @@ -11,7 +11,7 @@ {{- else}} {{- end}} -{{- end }} +{{- else }} {{ with $.Params.images }}{{ range first 6 . -}} {{ end }}{{ else -}} @@ -24,6 +24,7 @@ {{- with $.Site.Params.images -}} {{ end }}{{ end }}{{ end }} +{{- end }} diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html index 2b3b7c96..de86c781 100644 --- a/layouts/partials/templates/twitter_cards.html +++ b/layouts/partials/templates/twitter_cards.html @@ -5,7 +5,7 @@ {{- else }} {{- end}} -{{ end }} +{{- else }} {{- with $.Params.images -}} @@ -25,6 +25,7 @@ {{- end -}} {{- end -}} {{- end }} +{{- end }} {{ with .Site.Social.twitter -}} From 95e6bf1e135b4acaf4b14b6ae9592d968bbfc231 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:17:39 +0530 Subject: [PATCH 015/669] list: show nested sections * shows links to section if _index.md is present * by this sub-sections can be distinguished properly * more about this and way to implement: https://gohugo.io/content-management/organization/#index-pages-_indexmd --- layouts/_default/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 0b2f0f3c..ebe7b0d4 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,7 +10,7 @@ {{- end }} -{{- $pages := .RegularPages }} +{{- $pages := union .RegularPages .Sections }} {{- if .IsHome }} {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} From fb945ba3c1c1317bb70eba9d998cc6d690d077d5 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 15 Oct 2020 10:21:33 +0530 Subject: [PATCH 016/669] json-schema: add support for Rich Results: Json schema for structured data (#36) * json-schema: init * sameAs can be set through .Site.Params.schema.sameAs * if it is not specified but social-icons exsists, we use social-icons for sameAs vars * .Site.Params.schema.sameAs overrides social-icons * publisherType can be changed via .Site.Params.schema.publisherType --- layouts/partials/head.html | 4 +- layouts/partials/templates/schema.html | 31 ---------- layouts/partials/templates/schema_json.html | 65 +++++++++++++++++++++ 3 files changed, 67 insertions(+), 33 deletions(-) delete mode 100644 layouts/partials/templates/schema.html create mode 100644 layouts/partials/templates/schema_json.html diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 55fa1328..1f786287 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -51,5 +51,5 @@ {{- template "_internal/google_analytics_async.html" . }} {{- template "partials/templates/opengraph.html" . }} {{- template "partials/templates/twitter_cards.html" . }} -{{- template "partials/templates/schema.html" . }} -{{- end }} \ No newline at end of file +{{- template "partials/templates/schema_json.html" . }} +{{- end }} diff --git a/layouts/partials/templates/schema.html b/layouts/partials/templates/schema.html deleted file mode 100644 index 6c032b66..00000000 --- a/layouts/partials/templates/schema.html +++ /dev/null @@ -1,31 +0,0 @@ - - - -{{- if .IsPage }}{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}{{ if not .PublishDate.IsZero }} -{{ end }} -{{ if not .Lastmod.IsZero }}{{ end }} - -{{- if .Params.cover.image -}} -{{- if (ne .Params.cover.relative true) }} - -{{- else}} - -{{- end}} -{{- else }} -{{ with $.Params.images }}{{ range first 6 . -}} - -{{ 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 }} -{{- end }} - - - -{{- end }} diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html new file mode 100644 index 00000000..a186603b --- /dev/null +++ b/layouts/partials/templates/schema_json.html @@ -0,0 +1,65 @@ +{{ if .IsHome }} + +{{- else if .IsPage }} + +{{ end }} From a980d10bfc7d0d1e058afb5528c637ad39a5ef04 Mon Sep 17 00:00:00 2001 From: Northerner-coder <50540933+Northerner-coder@users.noreply.github.com> Date: Fri, 16 Oct 2020 08:56:54 -0400 Subject: [PATCH 017/669] i18n: ru: Add full Russian localization (#40) --- i18n/ru.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 84abf107..cf081eab 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -1,5 +1,14 @@ - id: prev_page - translation: "Сюда" + translation: 'Предыдущая' - id: next_page - translation: "Туда" + translation: 'Следующая' + +- id: read_time + translation: '{{ .Count }} мин' + +- id: toc + translation: 'Оглавление' + +- id: translations + translation: 'Переводы' From db52aa994294f3f2a412efee7802c752073018e2 Mon Sep 17 00:00:00 2001 From: Northerner-coder <50540933+Northerner-coder@users.noreply.github.com> Date: Fri, 16 Oct 2020 12:42:32 -0400 Subject: [PATCH 018/669] layouts: Add DateFormat parameter (#39) * User can change Date Format to be displayed in Front Matter * Formats supported by Hugo can be found here: https://gohugo.io/functions/format/#hugo-date-and-time-templating-reference --- layouts/_default/archives.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index ce0c153b..e2e6993a 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -22,7 +22,7 @@ {{- .Title | markdownify }}
- + {{- if $.Site.Params.ShowReadingTime }} ·  {{- $default_txt := print .ReadingTime " " "min" }} {{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ebe7b0d4..a92fe71d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -52,7 +52,7 @@ {{- end }}
-{{- end}} \ No newline at end of file +{{- end}} diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index 279a3a4e..5de8057a 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -2,8 +2,8 @@ {{- with .Site.Params.profileMode }}
{{- if .imageUrl}}{{ .imageTitle | default {{- end}} -

{{- .title | default $.Site.Title -}}

- {{- .subtitle -}} +

{{- .title | default $.Site.Title | markdownify -}}

+ {{- .subtitle | markdownify -}} {{- partial "social_icons.html" $.Site.Params.socialIcons -}} {{- with .buttons }} @@ -17,4 +17,4 @@ {{- end }}
{{- end}} - \ No newline at end of file + From 7db1be3d7349eaba2dd87bfeb240b8bc120f4663 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 17 Oct 2020 16:00:46 +0530 Subject: [PATCH 022/669] head: update description and keywords logic --- layouts/partials/head.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1f786287..41a6b6db 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,13 +4,12 @@ {{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} - {{ end }}{{end}}{{ .Site.Title }} -{{- if in site.Params.mainSections .Type }} - - -{{- else }} - -{{- end }} + + {{- if .Site.Params.analytics.google.SiteVerificationTag }} From b720e4a523c9c918408b89de6999a1b6a1a4477c Mon Sep 17 00:00:00 2001 From: Northerner-coder <50540933+Northerner-coder@users.noreply.github.com> Date: Sun, 18 Oct 2020 10:51:42 -0400 Subject: [PATCH 023/669] extended_head: init (#44) * add placeholder template for extending head --- layouts/partials/extend_head.html | 5 +++++ layouts/partials/head.html | 1 + 2 files changed, 6 insertions(+) create mode 100644 layouts/partials/extend_head.html diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html new file mode 100644 index 00000000..d372acc9 --- /dev/null +++ b/layouts/partials/extend_head.html @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 41a6b6db..48b5d355 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -45,6 +45,7 @@ {{- range .AlternativeOutputFormats -}} {{ end -}} +{{- partial "extend_head.html" . -}} {{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }} {{- template "_internal/google_analytics_async.html" . }} From a41f09bb99a9529fbf9506dc05981fbd37de4484 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 18 Oct 2020 21:52:22 +0530 Subject: [PATCH 024/669] extended_footer: init * add placeholder template for extending footer closes #37 --- layouts/partials/extend_footer.html | 5 +++++ layouts/partials/footer.html | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/extend_footer.html diff --git a/layouts/partials/extend_footer.html b/layouts/partials/extend_footer.html new file mode 100644 index 00000000..52714e8c --- /dev/null +++ b/layouts/partials/extend_footer.html @@ -0,0 +1,5 @@ + + + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1c28f3ab..f6d407e2 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -15,6 +15,7 @@
+{{- partial "extend_footer.html" . -}} {{ if in site.Params.mainSections .Type }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint -}} @@ -66,4 +67,4 @@ -{{- end }} \ No newline at end of file +{{- end }} From a153a7cc6fe6498029105f8af73587291d7276b0 Mon Sep 17 00:00:00 2001 From: Mehdy Khoshnoody Date: Mon, 19 Oct 2020 12:47:23 +0330 Subject: [PATCH 025/669] Add RTL support for multilingual mode (#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Usage: in site config: languages: ar: languagedirection: rtl title: مدونتي weight: 2 * ref: https://gohugo.io/content-management/multilingual/#configure-languages --- assets/css/footer.css | 4 ++-- assets/css/header.css | 8 ++++---- assets/css/main.css | 18 +++++++++++++++--- assets/css/post-single.css | 24 ++++++++++++------------ layouts/_default/baseof.html | 2 +- 5 files changed, 34 insertions(+), 22 deletions(-) diff --git a/assets/css/footer.css b/assets/css/footer.css index 4fd3acea..cf7197f9 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -11,8 +11,8 @@ } .footer span { - margin-left: 1px; - margin-right: 1px; + margin-inline-start: 1px; + margin-inline-end: 1px; } .footer a { diff --git a/assets/css/header.css b/assets/css/header.css index e5061d43..ef68ef48 100644 --- a/assets/css/header.css +++ b/assets/css/header.css @@ -5,8 +5,8 @@ flex-wrap: wrap; justify-content: space-between; max-width: calc(var(--nav-width) + var(--gap) * 2); - margin-left: auto; - margin-right: auto; + margin-inline-start: auto; + margin-inline-end: auto; } .nav a { @@ -31,7 +31,7 @@ pointer-events: none; transform: translate(0, -10%); border-radius: 6px; - margin-right: 8px; + margin-inline-end: 8px; } .theme-toggle svg{ @@ -56,7 +56,7 @@ body:not(.dark) #sun { } .menu li+li { - margin-left: var(--gap); + margin-inline-start: var(--gap); } .menu a { diff --git a/assets/css/main.css b/assets/css/main.css index 8b6c492d..68f8a2f1 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -36,7 +36,7 @@ } .pagination .next { - margin-left: auto; + margin-inline-start: auto; } .social-icons { @@ -44,10 +44,22 @@ } .social-icons a:not(:last-of-type) { - margin-right: 12px; + margin-inline-end: 12px; } .social-icons a svg { height: 26px; width: 26px; -} \ No newline at end of file +} + +.direction-rtl { + direction: rtl; +} + +.direction-ltr { + direction: ltr; +} + +code { + direction: ltr; +} diff --git a/assets/css/post-single.css b/assets/css/post-single.css index e472704c..57269ddf 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -85,7 +85,7 @@ .post-content ul, .post-content ol { - padding-left: 20px; + padding-inline-start: 20px; } .post-content li { @@ -109,8 +109,8 @@ .post-content dd { width: 75%; - margin-left: 0; - padding-left: 10px; + margin-inline-start: 0; + padding-inline-start: 10px; } .post-content dt~dt, @@ -147,11 +147,11 @@ } .post-content li>.highlight { - margin-right: 0 + margin-inline-end: 0 } .post-content ul pre { - margin-left: calc(var(--gap) * -2); + margin-inline-start: calc(var(--gap) * -2); } .post-content .highlight pre { @@ -168,7 +168,7 @@ } .post-content .highlighttable td .linenodiv { - padding-right: 0 !important; + padding-inline-end: 0 !important; } .post-content .highlighttable td .linenodiv pre, @@ -236,7 +236,7 @@ .toc details summary { cursor: zoom-in; - margin-left: 20px; + margin-inline-start: 20px; } .toc details[open] summary { @@ -254,7 +254,7 @@ } .toc li ul { - margin-left: var(--gap); + margin-inline-start: var(--gap); } .post-footer { @@ -263,14 +263,14 @@ .post-tags li { display: inline-block; - margin-right: 3px; + margin-inline-end: 3px; margin-bottom: 5px; } .post-tags a { display: block; - padding-left: 14px; - padding-right: 14px; + padding-inline-start: 14px; + padding-inline-end: 14px; color: var(--secondary); font-size: 14px; line-height: 34px; @@ -297,7 +297,7 @@ } .share-buttons a:not(:last-of-type) { - margin-right: 12px; + margin-inline-end: 12px; } .share-buttons a svg { diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6deb9a91..cd999824 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . }} From ddbd65b93760d647be430110bc575068d2135035 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 19 Oct 2020 15:58:50 +0530 Subject: [PATCH 026/669] Update README --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6746fdd6..8b19ce2e 100755 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya - Multilingual support. - Cover image for each post - Light/Dark theme ( automatic theme switch a/c to browser theme) +- SEO Friendly - No webpack, nodejs and other depedencies required to edit the theme :) Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) @@ -65,12 +66,22 @@ Read this post For More Details => [Social-Icons](https://adityatelange.github.i --- +### Sponsoring + +If you like my work and if you think this project is worth to support it, you can + + +Buy Me A Coffee + + +--- + ## Found a bug? If you spot any bugs, please use [Issue Tracker](https://github.com/adityatelange/hugo-PaperMod/issues) and/or create a new [Pull Request](https://github.com/adityatelange/hugo-PaperMod/pulls) to fix the issue. -![GitHub issues](https://img.shields.io/github/issues-raw/adityatelange/hugo-papermod) -![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/adityatelange/hugo-PaperMod) -![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/adityatelange/hugo-papermod) -![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/adityatelange/hugo-papermod) \ No newline at end of file +[![GitHub issues](https://img.shields.io/github/issues-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/issues?q=is%3Aopen) +[![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/issues?q=is%3Aissue+is%3Aclosed) +[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/pulls?q=is%3Aopen+is%3Apr) +[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/adityatelange/hugo-papermod)](https://github.com/adityatelange/hugo-PaperMod/pulls?q=is%3Apr+is%3Aclosed) From c0ba1ce20dfe9823fff3a4b86e0b04fe8ebb0287 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 19 Oct 2020 19:00:01 +0530 Subject: [PATCH 027/669] social-icons: add svg for medium * icon belong to medium[.]com * converted to svg with online-convert[.]com --- layouts/partials/svg.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 58fbe422..0ab8f789 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -177,6 +177,14 @@ +{{- else if (eq .name "medium") -}} + + + + + {{- else if (eq .name "mixcloud") -}} -{{- end -}} \ No newline at end of file +{{- end -}} From ea9aa385734acce8aedabd70d83ff30c47fa945d Mon Sep 17 00:00:00 2001 From: Zhangyuan Nie Date: Tue, 20 Oct 2020 01:08:43 -0400 Subject: [PATCH 028/669] header: disable user-select for theme-toggle (#52) * fix: clicking twice on theme switch selects other text on the nav-bar. --- assets/css/header.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/header.css b/assets/css/header.css index ef68ef48..72b5f6aa 100644 --- a/assets/css/header.css +++ b/assets/css/header.css @@ -34,9 +34,10 @@ margin-inline-end: 8px; } -.theme-toggle svg{ +.theme-toggle svg { height: 18px; margin: 0 10px; + user-select: none; } body.dark #moon{ From 3e92b5aa2938adc41cc5a376d3ad7cd1dc2fd99e Mon Sep 17 00:00:00 2001 From: Zhangyuan Nie Date: Wed, 21 Oct 2020 01:06:44 -0400 Subject: [PATCH 029/669] chore: add go.mod (#51) * more about this: https://gohugo.io/hugo-modules/use-modules/ --- go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..af958556 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/adityatelange/hugo-PaperMod + +go 1.12 From 21241c212ea9b6a7f8727564bd245bf3857e1a0d Mon Sep 17 00:00:00 2001 From: Niek Blankers Date: Thu, 22 Oct 2020 13:12:26 +0200 Subject: [PATCH 030/669] relative-cover: init Responsive cover images (#43) Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com> - generates images of different sizes - browser can choose between set of images w.r.t viewport width - is enabled by default - supported image formats : https://gohugo.io/content-management/image-processing/#target-format - Customizing site config params: params: cover: responsiveImages: false # if want to disable it linkFullImages: true # if link original image on clicking cover --- layouts/_default/list.html | 12 ++---------- layouts/_default/single.html | 13 ++----------- layouts/partials/cover.html | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 layouts/partials/cover.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a92fe71d..3596a931 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -31,15 +31,7 @@ {{- $class = "post-entry tag-entry" }} {{- end }}
- {{- if .Params.cover.image }} -
- {{- if (ne .Params.cover.relative true) }} - {{ .Params.cover.alt | plainify }} - {{- else}} - {{ .Params.cover.alt | plainify }} - {{- end}} -
- {{- end }} + {{- partial "cover.html" (dict "cxt" . "IsHome" true) }}

{{ .Title }} @@ -75,4 +67,4 @@ {{- end }} {{end}}{{/* end profileMode */}} -{{- end }}{{- /* end main */ -}} \ No newline at end of file +{{- end }}{{- /* end main */ -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ec8038e9..20c3bc93 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -26,16 +26,7 @@ {{- end}}

- {{- if .Params.cover.image }} -
- {{- if (ne .Params.cover.relative true) }} - {{ .Params.cover.alt | plainify }} - {{- else}} - {{ .Params.cover.alt | plainify }} - {{- end}} -

{{.Params.cover.caption | markdownify }}

-
- {{- end }} + {{- partial "cover.html" (dict "cxt" . "IsHome" false) }} {{- if .Params.ShowToc }}
@@ -68,4 +59,4 @@ {{- end }}
-{{- end }}{{/* end main */}} \ No newline at end of file +{{- end }}{{/* end main */}} diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html new file mode 100644 index 00000000..7be43ea6 --- /dev/null +++ b/layouts/partials/cover.html @@ -0,0 +1,32 @@ +{{- with .cxt}} {{/* Apply proper context from dict */}} +{{- if .Params.cover.image }} +{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} +
+ {{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }} + {{- $cover := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- if $cover -}}{{/* i.e it is present in page bundle */}} + {{- if $addLink }}{{ end -}} + {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }} + {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false)) }} + {{ $alt }} + {{- else }}{{/* Unprocessable image or responsive images disabled */}} + {{ $alt }} + {{- end }} + {{- else }}{{/* For absolute urls and external links, no img processing here */}} + {{- if $addLink }}{{ end -}} + {{ $alt }} + {{- end }} + {{- if $addLink }}{{ end -}} + {{/* Display Caption */}} + {{- if not $.IsHome }} + {{ with .Params.cover.caption }}

{{ . | markdownify }}

{{- end }} + {{- end }} +
+{{- end }}{{/* End image */}} +{{- end -}}{{/* End context */}} From 3d6037049459a0dec8a5797021f1ee39267fd725 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 20 Oct 2020 14:56:42 +0530 Subject: [PATCH 031/669] reset(css): themify text selection --- assets/css/reset.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/assets/css/reset.css b/assets/css/reset.css index 78760c47..6c487ef6 100644 --- a/assets/css/reset.css +++ b/assets/css/reset.css @@ -140,3 +140,13 @@ img { *:focus { outline:none; } + +*::-moz-selection { + background-color: var(--tertiary); + color: var(--primary); +} + +*::selection { + background-color: var(--tertiary); + color: var(--primary); +} From 684cb2160fc84a75e17c5d423c000dc94487839e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 20 Oct 2020 18:38:29 +0530 Subject: [PATCH 032/669] layouts: post_meta as partial --- layouts/_default/archives.html | 8 ++------ layouts/_default/list.html | 6 +----- layouts/_default/single.html | 6 +----- layouts/partials/post_meta.html | 5 +++++ 4 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 layouts/partials/post_meta.html diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index e2e6993a..b63460ba 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -22,11 +22,7 @@ {{- .Title | markdownify }}
- - {{- if $.Site.Params.ShowReadingTime }} ·  - {{- $default_txt := print .ReadingTime " " "min" }} - {{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }} - {{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }} + {{- partial "post_meta.html" . -}}
@@ -39,4 +35,4 @@ {{- end }} {{- end }} -{{- end }}{{/* end main */}} \ No newline at end of file +{{- end }}{{/* end main */}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 3596a931..dad1d3ce 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -44,11 +44,7 @@ {{- end }}
- - {{- if $.Site.Params.ShowReadingTime }} ·  - {{- $default_txt := print .ReadingTime " " "min" }} - {{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }} - {{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }} + {{- partial "post_meta.html" . -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 20c3bc93..b13fb74a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,11 +8,7 @@ {{- if .Params.hideMeta }}{{ else }}
- - {{- if $.Site.Params.ShowReadingTime -}} ·  - {{- $default_txt := print .ReadingTime " " "min" }} - {{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }} - {{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }} + {{- partial "post_meta.html" . -}} {{- if .IsTranslated -}} | 
From 834feb9adc209c3151a229fe5b7d521400153f51 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 23 Oct 2020 11:35:30 +0530 Subject: [PATCH 035/669] cover: responsive cover: generate responsive images only in "production" env - will reduce render time in development env --- layouts/partials/cover.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index 7be43ea6..b4487329 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -8,7 +8,8 @@ {{- if $addLink }}{{ end -}} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }} - {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false)) }} + {{- $prod := (eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")) }} + {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false) (eq $prod true)) }} Date: Fri, 23 Oct 2020 13:11:20 +0330 Subject: [PATCH 036/669] i18n: Add translations for fa: Farsi (#56) --- i18n/fa.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 i18n/fa.yaml diff --git a/i18n/fa.yaml b/i18n/fa.yaml new file mode 100644 index 00000000..3cdd047c --- /dev/null +++ b/i18n/fa.yaml @@ -0,0 +1,16 @@ +- id: prev_page + translation: "صفحهٔ قبل" + +- id: next_page + translation: "صفحهٔ بعد" + +- id: read_time + translation: + one : "1 دقیقه" + other: "{{ .Count }} دقیقه" + +- id: toc + translation: "فهرست مطالب" + +- id: translations + translation: "ترجمه‌ها" From 413034e43b589e2e811be9a4b8f0ab3f079f9294 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:56:41 +0530 Subject: [PATCH 037/669] social-icons: fix duplicate rel tags --- layouts/partials/social_icons.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html index 5cc5f8bc..7bb9c143 100644 --- a/layouts/partials/social_icons.html +++ b/layouts/partials/social_icons.html @@ -1,6 +1,6 @@
{{- range . -}} - {{ partial "svg.html" . }} {{- end -}}
From 4e9d470fec995c51f6f27c3b6659fa1e4bd5a274 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 23 Oct 2020 16:02:15 +0530 Subject: [PATCH 038/669] Revert "reset(css): themify text selection" * looks ugly :p This reverts commit 3d6037049459a0dec8a5797021f1ee39267fd725. --- assets/css/reset.css | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/assets/css/reset.css b/assets/css/reset.css index 6c487ef6..78760c47 100644 --- a/assets/css/reset.css +++ b/assets/css/reset.css @@ -140,13 +140,3 @@ img { *:focus { outline:none; } - -*::-moz-selection { - background-color: var(--tertiary); - color: var(--primary); -} - -*::selection { - background-color: var(--tertiary); - color: var(--primary); -} From 3e3a7d380ee17e005da5ac820b9b96491d86fa60 Mon Sep 17 00:00:00 2001 From: Mehdy Khoshnoody Date: Sat, 24 Oct 2020 17:12:24 +0330 Subject: [PATCH 039/669] post-single(css): improve RTL support (#57) * Replace left with start for tables and block-quote --- assets/css/post-single.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 57269ddf..3a61be5e 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -132,7 +132,7 @@ .post-content table th { font-size: 14px; - text-align: left; + text-align: start; } .post-content table:not(.highlighttable) td code:only-child { @@ -208,7 +208,7 @@ .post-content blockquote { margin: 0 calc(var(--gap) * -1); padding: 0 32px; - border-left: 2px solid var(--primary); + border-inline-start: 2px solid var(--primary); } .post-content hr { From db0e744af3953160257ebe01ebfcfdaf22bc1bf2 Mon Sep 17 00:00:00 2001 From: Dragomir Yordanov Date: Sun, 25 Oct 2020 05:22:26 +0100 Subject: [PATCH 040/669] i18n: improve for 'es' and add 'bg' (#58) * Translate read_time, toc and translations to spanish * Add translations in bulgarian --- i18n/bg.yaml | 16 ++++++++++++++++ i18n/es.yaml | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 i18n/bg.yaml diff --git a/i18n/bg.yaml b/i18n/bg.yaml new file mode 100644 index 00000000..1e314af8 --- /dev/null +++ b/i18n/bg.yaml @@ -0,0 +1,16 @@ +- id: prev_page + translation: "Предишна страница" + +- id: next_page + translation: "Следваща страница" + +- id: read_time + translation: + one : "1 мин" + other: "{{ .Count }} мин" + +- id: toc + translation: "Съдържание" + +- id: translations + translation: "Преводи" diff --git a/i18n/es.yaml b/i18n/es.yaml index 5d407d59..38d2239d 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -3,3 +3,14 @@ - id: next_page translation: "Página siguiente" + +- id: read_time + translation: + one : "1 min" + other: "{{ .Count }} min" + +- id: toc + translation: "Tabla de Contenidos" + +- id: translations + translation: "Traducciones" From 3e84ff0435684f578969929385a727712630a89a Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 11:17:54 +0530 Subject: [PATCH 041/669] =?UTF-8?q?post-meta:=20fix=20redundant=20'=C2=B7'?= =?UTF-8?q?(separator)=20in=20end=20when=20author=20is=20not=20present?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/post_meta.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 479ab897..1b329470 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -1,11 +1,17 @@ +{{- $scratch := newScratch}} + {{- if not .Date.IsZero -}} - ·  +{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }} {{- end -}} {{- if $.Site.Params.ShowReadingTime -}} -{{- i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime) }} ·  +{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }} {{- end -}} {{- if or .Params.author .Site.Params.author }} -{{- printf "%s" (.Params.author | default .Site.Params.author) }} +{{- $scratch.Add "meta" (slice (.Params.author | default .Site.Params.author)) }} {{- end -}} + +{{- with ($scratch.Get "meta")}} +{{- delimit . " · "}} +{{- end }} From bc2b82c370be7a5554cd886033b3e3e0d21bdea2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 12:15:51 +0530 Subject: [PATCH 042/669] author(partial): init, with support for multiple authors * usage: author: ["me", "you"] --- layouts/partials/author.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 layouts/partials/author.html diff --git a/layouts/partials/author.html b/layouts/partials/author.html new file mode 100644 index 00000000..f91a1168 --- /dev/null +++ b/layouts/partials/author.html @@ -0,0 +1,9 @@ +{{- if or .Params.author .Site.Params.author }} +{{- $author := (.Params.author | default .Site.Params.author)}} +{{- $author_type := (printf "%T" $author) }} +{{- if (eq $author_type "[]string") }} +{{- (delimit $author ", " ) }} +{{- else }} +{{- $author }} +{{- end }} +{{- end -}} From 5b9eaac1306044922f0a9ec3806a786a0cdd036f Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 12:47:09 +0530 Subject: [PATCH 043/669] layouts: use author partial in head and post_meta --- layouts/partials/head.html | 2 +- layouts/partials/post_meta.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 48b5d355..af7ac9d6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,7 +10,7 @@ - + {{- if .Site.Params.analytics.google.SiteVerificationTag }} diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 1b329470..e0dbef40 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -8,9 +8,9 @@ {{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }} {{- end -}} -{{- if or .Params.author .Site.Params.author }} -{{- $scratch.Add "meta" (slice (.Params.author | default .Site.Params.author)) }} -{{- end -}} +{{ with (partial "author.html" . ) }} +{{ $scratch.Add "meta" (slice .)}} +{{end}} {{- with ($scratch.Get "meta")}} {{- delimit . " · "}} From 44bc299ca3b21600d2ed1bd01e83ca2ab83bc7ca Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 12:49:58 +0530 Subject: [PATCH 044/669] json-schema: add support for multiple authors --- layouts/partials/templates/schema_json.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html index a186603b..ff84c97f 100644 --- a/layouts/partials/templates/schema_json.html +++ b/layouts/partials/templates/schema_json.html @@ -41,13 +41,26 @@ {{- else -}} {{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}, {{- end}} - {{- end}} + {{- end -}} "datePublished": {{ .PublishDate }}, "dateModified": {{ .Lastmod }}, - "author": { + {{- with (.Params.author | default .Site.Params.author) }} + "author": + {{- if (eq (printf "%T" .) "[]string") -}} + [{{- range $i, $v := . -}} + {{- if $i }}, {{end -}} + { "@type": "Person", - "name": {{ .Params.author | default .Site.Params.author }} + "name": {{ $v }} + } + {{- end }}], + {{- else -}} + { + "@type": "Person", + "name": {{ . }} }, + {{- end -}} + {{- end }} "mainEntityOfPage": { "@type": "WebPage", "@id": {{ .Permalink | safeHTML }} From 9ac0f391f602530ce5ae93bcb8f19a915a218fc7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 13:01:49 +0530 Subject: [PATCH 045/669] author(partial): fix multiple authors in config displayed incorrectly * is of type `[]interface {}` and not `[]string` --- layouts/partials/author.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/author.html b/layouts/partials/author.html index f91a1168..a1ef62c9 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -1,7 +1,7 @@ {{- if or .Params.author .Site.Params.author }} {{- $author := (.Params.author | default .Site.Params.author)}} {{- $author_type := (printf "%T" $author) }} -{{- if (eq $author_type "[]string") }} +{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}") ) }} {{- (delimit $author ", " ) }} {{- else }} {{- $author }} From 0bd68d242c1e19ea0ee3cd16c547957709160b88 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 13:03:50 +0530 Subject: [PATCH 046/669] update README --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8b19ce2e..7a6f1cd6 100755 --- a/README.md +++ b/README.md @@ -39,13 +39,14 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) - Table of Content Generation (newer implementation). -- Archive of posts +- Archive of posts. - Social-Media Share buttons on post. - Menu location indicator. - Multilingual support. -- Cover image for each post -- Light/Dark theme ( automatic theme switch a/c to browser theme) -- SEO Friendly +- Cover image for each post (with Responsive image support). +- Light/Dark theme ( automatic theme switch a/c to browser theme). +- SEO Friendly. +- Muliple Author support. - No webpack, nodejs and other depedencies required to edit the theme :) Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) From 1256f353e5b9c4716578f55c443786429dea0e4d Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 13:08:03 +0530 Subject: [PATCH 047/669] json-schema:fix multiple authors in config displayed incorrectly * is of type `[]interface {}` and not `[]string` --- layouts/partials/templates/schema_json.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html index ff84c97f..f04a0bfa 100644 --- a/layouts/partials/templates/schema_json.html +++ b/layouts/partials/templates/schema_json.html @@ -46,7 +46,7 @@ "dateModified": {{ .Lastmod }}, {{- with (.Params.author | default .Site.Params.author) }} "author": - {{- if (eq (printf "%T" .) "[]string") -}} + {{- if (or (eq (printf "%T" .) "[]string") (eq (printf "%T" .) "[]interface {}")) -}} [{{- range $i, $v := . -}} {{- if $i }}, {{end -}} { From 70a2b06ac15ee2f40320c9d4150f089ecbe833b1 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 13:57:03 +0530 Subject: [PATCH 048/669] share-icons: add #hashtag generation from tags for twitter share --- layouts/partials/share_icons.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/layouts/partials/share_icons.html b/layouts/partials/share_icons.html index b0c2f0a8..e1d40a77 100644 --- a/layouts/partials/share_icons.html +++ b/layouts/partials/share_icons.html @@ -1,8 +1,17 @@ {{- $pageurl := .Permalink }} {{- $title := .Title }} + +{{ $.Scratch.Set "tags" ""}} + +{{- with .Params.Tags }} +{{ $hashtags := newScratch}} +{{ range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} +{{ $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} +{{- end }} + \ No newline at end of file + From a97de0f9a4208fd112ee676ac3b200cea6ba25c4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 25 Oct 2020 16:08:52 +0530 Subject: [PATCH 049/669] reset(css): rm bold styling (#55) --- assets/css/reset.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/assets/css/reset.css b/assets/css/reset.css index 78760c47..68aa1e90 100644 --- a/assets/css/reset.css +++ b/assets/css/reset.css @@ -51,11 +51,6 @@ p { margin-bottom: 0; } -strong, -b { - font-weight: 500; -} - ul { margin: 0; padding: 0; From c33dabf3a233fdeb46bdc63bb6256d75b709faad Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 26 Oct 2020 22:19:05 +0530 Subject: [PATCH 050/669] header: add Language switch (#54) * language-switch: init * header: move logo-switches together --- assets/css/header.css | 24 ++++++++++- layouts/partials/header.html | 79 ++++++++++++++++++++++++------------ 2 files changed, 75 insertions(+), 28 deletions(-) diff --git a/assets/css/header.css b/assets/css/header.css index 72b5f6aa..fe255762 100644 --- a/assets/css/header.css +++ b/assets/css/header.css @@ -7,17 +7,18 @@ max-width: calc(var(--nav-width) + var(--gap) * 2); margin-inline-start: auto; margin-inline-end: auto; + line-height: var(--header-height); } .nav a { display: block; - line-height: var(--header-height); } .logo, .menu { display: flex; margin: auto var(--gap); + flex-wrap: inherit; } .logo a { @@ -40,7 +41,7 @@ user-select: none; } -body.dark #moon{ +body.dark #moon { vertical-align: middle; display: none; } @@ -68,3 +69,22 @@ body:not(.dark) #sun { font-weight: 500; border-bottom: 2px solid currentColor; } + +.lang-switch ul { + display: inline-flex; +} + +.lang-switch a { + font-size: 16px; + font-weight: 500; + margin: 0 8px; +} + +.lang-switch li { + display: inline-flex; +} + +.logo-switches { + display: inline-flex; + flex-wrap: inherit; +} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 0f2e72b1..48a9f4eb 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,6 +10,7 @@ document.body.classList.add('dark'); } } + {{- end }} {{- if (and (.Site.Params.disableThemeToggle) (eq .Site.Params.defaultTheme "auto")) }} @@ -17,6 +18,7 @@ if (window.matchMedia('(prefers-color-scheme: dark)').matches) { document.body.classList.add('dark'); } + {{- end }}
From b40f30754d39375a9d2f06f100f836bc155faf03 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 26 Oct 2020 22:49:27 +0530 Subject: [PATCH 051/669] header: add cursor type pointer to theme-toggle --- assets/css/header.css | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/css/header.css b/assets/css/header.css index fe255762..9697ac7e 100644 --- a/assets/css/header.css +++ b/assets/css/header.css @@ -39,6 +39,7 @@ height: 18px; margin: 0 10px; user-select: none; + cursor: pointer; } body.dark #moon { From 6c7b8cf2f9026c1111e5134b8bfc6d8cd2cdb1c2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 28 Oct 2020 09:35:21 +0530 Subject: [PATCH 052/669] share-icons: fix extra uneven padding --- assets/css/post-single.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 3a61be5e..3e25d08d 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -286,7 +286,7 @@ .share-buttons { margin-top: var(--gap); border: 1px solid var(--tertiary); - padding: var(--radius); + padding-inline-start: var(--radius); border-radius: var(--radius); display: flex; overflow-x: auto; @@ -316,4 +316,4 @@ margin: 0 calc(var(--gap) * -1); padding: 0 21px; } -} \ No newline at end of file +} From 7392edb1d3db813444d4fe166c9399153aa051a9 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 28 Oct 2020 11:11:13 +0530 Subject: [PATCH 053/669] README: update - rm old Lighthouse report - beautify - update demo image --- README.md | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 7a6f1cd6..4cc2a267 100755 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu ---

- HomeInfo + HomeInfo HomeInfo

@@ -33,21 +33,21 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya ## Features/Mods -- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. -- 3 Modes: - - Regular Mode. - - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) - - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) -- Table of Content Generation (newer implementation). -- Archive of posts. -- Social-Media Share buttons on post. -- Menu location indicator. -- Multilingual support. -- Cover image for each post (with Responsive image support). -- Light/Dark theme ( automatic theme switch a/c to browser theme). -- SEO Friendly. -- Muliple Author support. -- No webpack, nodejs and other depedencies required to edit the theme :) +- Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. +- 3 Modes: + - Regular Mode. + - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) + - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) +- Table of Content Generation (newer implementation). +- Archive of posts. +- Social-Media Share buttons on post. +- Menu location indicator. +- Multilingual support. +- Cover image for each post (with Responsive image support). +- Light/Dark theme ( automatic theme switch a/c to browser theme). +- SEO Friendly. +- Muliple Author support. +- No webpack, nodejs and other depedencies required to edit the theme :) Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) @@ -61,9 +61,7 @@ Read this post For More Details => [Social-Icons](https://adityatelange.github.i --- -## LightHouse Report - -LightHouse +## [LightHouse Report](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F) --- From 0887805caf54b19e7204718d8262e09ca08467ba Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 28 Oct 2020 22:41:42 +0530 Subject: [PATCH 054/669] README: update link faq post --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4cc2a267..e2037308 100755 --- a/README.md +++ b/README.md @@ -61,6 +61,12 @@ Read this post For More Details => [Social-Icons](https://adityatelange.github.i --- +## FAQs / How To's + +Read this post For More Details => [How To's Guide](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-how-to/) + +--- + ## [LightHouse Report](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fadityatelange.github.io%2Fhugo-PaperMod%2F) --- From 9acbc2c134c2052c54833d9ad63fa048694b9895 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 30 Oct 2020 01:01:48 +0530 Subject: [PATCH 055/669] baseof: use `dir` attribute instead of class and set default dir to `auto` main(css): rm unused class --- assets/css/main.css | 8 -------- layouts/_default/baseof.html | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 68f8a2f1..6fac98b9 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -52,14 +52,6 @@ width: 26px; } -.direction-rtl { - direction: rtl; -} - -.direction-ltr { - direction: ltr; -} - code { direction: ltr; } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cd999824..f28e12ba 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . }} @@ -15,4 +15,4 @@ {{- partialCached "footer.html" . .Type }} - \ No newline at end of file + From b239f42f6b419c1835ffdaa8286c7fd638a55303 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 30 Oct 2020 01:15:29 +0530 Subject: [PATCH 056/669] Add accesskeys (attribute specifies a shortcut key to activate/focus an element.) c - ToC Open/Close g- Go To Top h - Home (according to current lang) t - Theme toggle more: https://www.w3schools.com/tags/att_global_accesskey.asp --- layouts/_default/single.html | 2 +- layouts/partials/footer.html | 2 +- layouts/partials/header.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b13fb74a..72fe4a5f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -27,7 +27,7 @@
-
{{- i18n "toc" | default "Table of Contents" }}
+
{{- i18n "toc" | default "Table of Contents" }}
{{- partial "toc.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f6d407e2..a3ee83da 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,7 +9,7 @@ · Theme️ PaperMod - + - + {{- partial "extend_footer.html" . -}} {{ if in site.Params.mainSections .Type }} {{- if not .Site.Params.assets.disableFingerprinting }} From 91bc0acfa9212a55299ecd7abf71a99df10d01c4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 6 Dec 2020 22:31:18 +0530 Subject: [PATCH 115/669] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0bb53b5f..c61e396d 100755 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya - Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button). - SEO Friendly. - Muliple Author support. +- Search Page - No webpack, nodejs and other depedencies required to edit the theme :) Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) From 08e58f5f773f935a97ecd0ce32acc62c2bc40ad4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 7 Dec 2020 22:59:51 +0530 Subject: [PATCH 116/669] head: commonize stylesheet resource --- layouts/partials/head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 055701f8..baaf732f 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -21,12 +21,12 @@ {{- end}} +{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}} {{- if not .Site.Params.assets.disableFingerprinting }} -{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}} +{{- $stylesheet := $stylesheet | fingerprint -}} {{- else}} -{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify -}} {{- end}} From db38e156f56ce452f29d248cae3efca6eb865774 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 8 Dec 2020 00:16:11 +0530 Subject: [PATCH 117/669] footer: hljs: add check to not load hljs on archive and search --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 65045f46..e6e894af 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -14,7 +14,7 @@ {{- partial "extend_footer.html" . -}} -{{ if in site.Params.mainSections .Type }} +{{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From e252e761f54f1f871630cdcc5416e90de1ec89d6 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 29 Dec 2020 16:03:49 +0530 Subject: [PATCH 148/669] footer: allow disabling HLJS #143 usage => in site config => params: assets: disableHLJS: true per-page in front-matter => disableHLJS: true --- layouts/_default/baseof.html | 2 +- layouts/partials/footer.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 11fb6788..8f17b936 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -18,7 +18,7 @@ {{- block "main" . }} {{- end }} - {{- partialCached "footer.html" . .Type .Layout }} + {{- partialCached "footer.html" . .Type .Layout .Params }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c384c4ed..b34d278a 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -18,7 +18,8 @@ {{- partial "extend_footer.html" . -}} -{{ if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`)) }} +{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} +{{- if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`) (not $isHLJSdisabled)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} {{- else}} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - + {{- end}} {{- end }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From 09de369d2fa8d379104edaa08901e20f1209333c Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 6 Jan 2021 01:03:49 +0530 Subject: [PATCH 160/669] update fuse.js to v6.4.6 credits: https://github.com/krisk/Fuse/releases/tag/v6.4.6 --- assets/js/fuse.js | 173 +++++++++++++++++++++++----------------------- 1 file changed, 88 insertions(+), 85 deletions(-) diff --git a/assets/js/fuse.js b/assets/js/fuse.js index a037a879..6be05928 100644 --- a/assets/js/fuse.js +++ b/assets/js/fuse.js @@ -1,7 +1,7 @@ /** - * Fuse.js v6.4.3 - Lightweight fuzzy-search (http://fusejs.io) + * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io) * - * Copyright (c) 2020 Kiro Risk (http://kiro.me) + * Copyright (c) 2021 Kiro Risk (http://kiro.me) * All Rights Reserved. Apache Software License 2.0 * * http://www.apache.org/licenses/LICENSE-2.0 @@ -466,6 +466,7 @@ function norm() { var mantissa = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3; var cache = new Map(); + var m = Math.pow(10, mantissa); return { get: function get(value) { var numTokens = value.match(SPACE).length; @@ -474,7 +475,9 @@ return cache.get(numTokens); } - var n = parseFloat((1 / Math.sqrt(numTokens)).toFixed(mantissa)); + var norm = 1 / Math.sqrt(numTokens); // In place of `toFixed(mantissa)`, for faster computation + + var n = parseFloat(Math.round(norm * m) / m); cache.set(numTokens, n); return n; }, @@ -696,42 +699,6 @@ return myIndex; } - function transformMatches(result, data) { - var matches = result.matches; - data.matches = []; - - if (!isDefined(matches)) { - return; - } - - matches.forEach(function (match) { - if (!isDefined(match.indices) || !match.indices.length) { - return; - } - - var indices = match.indices, - value = match.value; - var obj = { - indices: indices, - value: value - }; - - if (match.key) { - obj.key = match.key.src; - } - - if (match.idx > -1) { - obj.refIndex = match.idx; - } - - data.matches.push(obj); - }); - } - - function transformScore(result, data) { - data.score = result.score; - } - function computeScore(pattern) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$errors = _ref.errors, @@ -1503,7 +1470,7 @@ var isMatch = !!indices.length; return { isMatch: isMatch, - score: isMatch ? 1 : 0, + score: isMatch ? 0 : 1, indices: indices }; } @@ -1838,6 +1805,85 @@ return next(query); } + function computeScore$1(results, _ref) { + var _ref$ignoreFieldNorm = _ref.ignoreFieldNorm, + ignoreFieldNorm = _ref$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref$ignoreFieldNorm; + results.forEach(function (result) { + var totalScore = 1; + result.matches.forEach(function (_ref2) { + var key = _ref2.key, + norm = _ref2.norm, + score = _ref2.score; + var weight = key ? key.weight : null; + totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm)); + }); + result.score = totalScore; + }); + } + + function transformMatches(result, data) { + var matches = result.matches; + data.matches = []; + + if (!isDefined(matches)) { + return; + } + + matches.forEach(function (match) { + if (!isDefined(match.indices) || !match.indices.length) { + return; + } + + var indices = match.indices, + value = match.value; + var obj = { + indices: indices, + value: value + }; + + if (match.key) { + obj.key = match.key.src; + } + + if (match.idx > -1) { + obj.refIndex = match.idx; + } + + data.matches.push(obj); + }); + } + + function transformScore(result, data) { + data.score = result.score; + } + + function format(results, docs) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$includeMatches = _ref.includeMatches, + includeMatches = _ref$includeMatches === void 0 ? Config.includeMatches : _ref$includeMatches, + _ref$includeScore = _ref.includeScore, + includeScore = _ref$includeScore === void 0 ? Config.includeScore : _ref$includeScore; + + var transformers = []; + if (includeMatches) transformers.push(transformMatches); + if (includeScore) transformers.push(transformScore); + return results.map(function (result) { + var idx = result.idx; + var data = { + item: docs[idx], + refIndex: idx + }; + + if (transformers.length) { + transformers.forEach(function (transformer) { + transformer(result, data); + }); + } + + return data; + }); + } + var Fuse = /*#__PURE__*/function () { function Fuse(docs) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; @@ -2189,52 +2235,9 @@ }]); return Fuse; - }(); // Practical scoring function + }(); - function computeScore$1(results, _ref8) { - var _ref8$ignoreFieldNorm = _ref8.ignoreFieldNorm, - ignoreFieldNorm = _ref8$ignoreFieldNorm === void 0 ? Config.ignoreFieldNorm : _ref8$ignoreFieldNorm; - results.forEach(function (result) { - var totalScore = 1; - result.matches.forEach(function (_ref9) { - var key = _ref9.key, - norm = _ref9.norm, - score = _ref9.score; - var weight = key ? key.weight : null; - totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm)); - }); - result.score = totalScore; - }); - } - - function format(results, docs) { - var _ref10 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - _ref10$includeMatches = _ref10.includeMatches, - includeMatches = _ref10$includeMatches === void 0 ? Config.includeMatches : _ref10$includeMatches, - _ref10$includeScore = _ref10.includeScore, - includeScore = _ref10$includeScore === void 0 ? Config.includeScore : _ref10$includeScore; - - var transformers = []; - if (includeMatches) transformers.push(transformMatches); - if (includeScore) transformers.push(transformScore); - return results.map(function (result) { - var idx = result.idx; - var data = { - item: docs[idx], - refIndex: idx - }; - - if (transformers.length) { - transformers.forEach(function (transformer) { - transformer(result, data); - }); - } - - return data; - }); - } - - Fuse.version = '6.4.3'; + Fuse.version = '6.4.6'; Fuse.createIndex = createIndex; Fuse.parseIndex = parseIndex; Fuse.config = Config; From 905640ceefd6f547f173feb4afa7d236b45f95b9 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 20:38:00 +0530 Subject: [PATCH 161/669] increase blockquote thickness inside post --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 0282d501..b11468ba 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -210,7 +210,7 @@ .post-content blockquote { margin: 0 0; padding: 0 14px; - border-inline-start: 2px solid var(--primary) + border-inline-start: 3px solid var(--primary) } .post-content hr { From 3b0997fc42e4b0acb4cadd11d54e7d1a60c74670 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 22:52:03 +0530 Subject: [PATCH 162/669] fix margin when hljs was disabled --- assets/css/post-single.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index b11468ba..8a0852b3 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -162,6 +162,10 @@ margin: 0 } +.post-content .highlight { + margin: auto 0 20px +} + .post-content .highlighttable { table-layout: fixed } From bd4a118afa6187d51c42560ea8f1f13b65e46c59 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 22:53:04 +0530 Subject: [PATCH 163/669] rm unnecessay color to box-shadow for anchors --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 8a0852b3..a9d1a155 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -66,7 +66,7 @@ .post-content a, .toc a:hover { - box-shadow: 0 1px 0 var(--primary) + box-shadow: 0 1px 0 } .post-content a code { From 9d478913ec59912e7c0664d1e7c882243debe3d4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 23:35:00 +0530 Subject: [PATCH 164/669] Update README.md replace unseen emoji --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d208291f..afd499c9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya --- -## Features/Mods 🪄 +## Features/Mods 💥 - Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. - 3 Modes: From 4fd4bc5e204cced21e574116140ca423c302f7d3 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 23:08:18 +0530 Subject: [PATCH 165/669] Add info to blank.css --- assets/css/extended/blank.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/css/extended/blank.css b/assets/css/extended/blank.css index e69de29b..a5772953 100644 --- a/assets/css/extended/blank.css +++ b/assets/css/extended/blank.css @@ -0,0 +1,5 @@ +/* +This is just a placeholder blank stylesheet so as to support adding custom styles budled with theme's default styles + +Read https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#bundling-custom-css-with-themes-assets for more info +*/ From 6a897a9e672c93bec263871a110e40b97ccdb39b Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 8 Jan 2021 23:36:01 +0530 Subject: [PATCH 166/669] update LICENSE for 2021 --- LICENSE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 0dc94d5e..85e428e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2020 nanxiaobei, adityatelange +Copyright (c) 2020 nanxiaobei and adityatelange +Copyright (c) 2021 adityatelange Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 6f397ef591a0163257ccbe3ceb4fc6a0061e2109 Mon Sep 17 00:00:00 2001 From: Muhammad Hanif Date: Mon, 11 Jan 2021 20:43:36 +0700 Subject: [PATCH 167/669] i18n: Add id Bahasa Indonesia (#173) --- i18n/id.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 i18n/id.yaml diff --git a/i18n/id.yaml b/i18n/id.yaml new file mode 100644 index 00000000..0add1217 --- /dev/null +++ b/i18n/id.yaml @@ -0,0 +1,16 @@ +- id: prev_page + translation: "Halaman Sebelumnya" + +- id: next_page + translation: "Halaman Selanjutnya" + +- id: read_time + translation: + one : "1 menit" + other: "{{ .Count }} menit" + +- id: toc + translation: "Daftar Isi" + +- id: translations + translation: "Terjemahan" From e809aef590273d6aa6c16414801f19d8829548a2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 20:01:19 +0530 Subject: [PATCH 168/669] lighten dark's border #5b5d67 -> #333 --- assets/css/theme-vars.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/theme-vars.css b/assets/css/theme-vars.css index 47c061ce..347502f0 100644 --- a/assets/css/theme-vars.css +++ b/assets/css/theme-vars.css @@ -14,7 +14,7 @@ --content: rgba(0, 0, 0, 0.88); --hljs-bg: #1c1d21; --code-bg: #f5f5f5; - --border: #eee + --border: #eee; } @media screen and (max-width:600px) { @@ -32,7 +32,7 @@ --content: rgba(255, 255, 255, 0.64); --hljs-bg: #2e2e33; --code-bg: #37383e; - --border: #5b5d67 + --border: #333; } .list { From 89414d00dc5a08b37e336e38772aaa8dd76f074c Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 20:15:04 +0530 Subject: [PATCH 169/669] add minimal border to post-entry - increases element speration without being noticed cc: #169 --- assets/css/post-entry.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index 17ad48a2..c06fd4aa 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -45,7 +45,8 @@ padding: var(--gap); background: var(--entry); border-radius: var(--radius); - transition: transform .1s + transition: transform .1s; + border: 1px solid var(--border); } .post-entry:active { From 7a0e1f369c9b6cf7e4158aca2b5e256841faddb3 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 20:31:03 +0530 Subject: [PATCH 170/669] change animation condition from hover to active for share-buttons and terms-tags --- assets/css/post-single.css | 2 +- assets/css/terms.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index a9d1a155..0dce08ca 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -331,7 +331,7 @@ transition: transform .1s } -.share-buttons svg:hover { +.share-buttons svg:active { transform: scale(.96) } diff --git a/assets/css/terms.css b/assets/css/terms.css index 82db4453..7a68cc3d 100644 --- a/assets/css/terms.css +++ b/assets/css/terms.css @@ -12,7 +12,7 @@ transition: transform .1s } -.terms-tags a:hover { +.terms-tags a:active { background: var(--tertiary); transform: scale(.96) } From dd835600104d051ebaf591658939ab131c5ff494 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Mon, 11 Jan 2021 21:01:50 +0530 Subject: [PATCH 171/669] go-top-top button cleanup --- assets/css/footer.css | 3 --- layouts/partials/footer.html | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/assets/css/footer.css b/assets/css/footer.css index 87dc7d43..15467ebb 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -28,7 +28,6 @@ .top-link { visibility: hidden; - opacity: 0; position: fixed; bottom: 60px; right: 30px; @@ -38,8 +37,6 @@ height: 42px; padding: 12px; border-radius: 64px; - fill: currentColor; - fill-opacity: 80%; transition: visibility .5s, opacity .8s linear } diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3a12866b..4623b3ff 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -11,7 +11,7 @@ From b6a308d331d7ef2f59599203eb3b59890baef8ac Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 13 Jan 2021 23:19:35 +0530 Subject: [PATCH 172/669] Do not smooth scrollIntoView if user has it preferred https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion --- layouts/partials/footer.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 4623b3ff..f5ca45d6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -38,9 +38,13 @@ anchor.addEventListener("click", function (e) { e.preventDefault(); var id = this.getAttribute("href").substr(1); - document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({ - behavior: "smooth" - }); + if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) { + document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView({ + behavior: "smooth" + }); + } else { + document.querySelector(`[id='${decodeURIComponent(id)}']`).scrollIntoView(); + } if (id === "top") { history.replaceState(null, null, " "); } else { From 18ae4e559314288780c91ee838fd1b2f92e662f7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 13 Jan 2021 23:35:54 +0530 Subject: [PATCH 173/669] respect prefers-reduced-motion while animating --- assets/css/post-entry.css | 6 ++++++ assets/css/post-single.css | 6 ++++++ assets/css/profile-mode.css | 6 ++++++ assets/css/search.css | 7 +++++++ assets/css/terms.css | 6 ++++++ 5 files changed, 31 insertions(+) diff --git a/assets/css/post-entry.css b/assets/css/post-entry.css index c06fd4aa..a9d08512 100644 --- a/assets/css/post-entry.css +++ b/assets/css/post-entry.css @@ -53,6 +53,12 @@ transform: scale(.96) } +@media (prefers-reduced-motion) { + .post-entry:active { + transform: none + } +} + .tag-entry .entry-cover { display: none } diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 0dce08ca..5dcb272f 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -335,6 +335,12 @@ transform: scale(.96) } +@media (prefers-reduced-motion) { + .share-buttons svg:active { + transform: none + } +} + h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, diff --git a/assets/css/profile-mode.css b/assets/css/profile-mode.css index d59f7363..52502373 100644 --- a/assets/css/profile-mode.css +++ b/assets/css/profile-mode.css @@ -55,3 +55,9 @@ .button:active { transform: scale(.96) } + +@media (prefers-reduced-motion) { + .button:active { + transform: none + } +} diff --git a/assets/css/search.css b/assets/css/search.css index 275cbe10..df3275c9 100644 --- a/assets/css/search.css +++ b/assets/css/search.css @@ -41,4 +41,11 @@ #searchResults .active { transform: scale(.98); + border: 2px solid var(--tertiary) +} + +@media (prefers-reduced-motion) { + #searchResults .active { + transform: none + } } diff --git a/assets/css/terms.css b/assets/css/terms.css index 7a68cc3d..c20357fa 100644 --- a/assets/css/terms.css +++ b/assets/css/terms.css @@ -16,3 +16,9 @@ background: var(--tertiary); transform: scale(.96) } + +@media (prefers-reduced-motion) { + .terms-tags a:active { + transform: none + } +} From ad44cdda0f5e18c0c605e80eb6e9818fe112de77 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 15 Jan 2021 23:21:13 +0530 Subject: [PATCH 174/669] fix highlight.js loading on section pages --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f5ca45d6..276a76af 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -18,7 +18,7 @@ {{- partial "extend_footer.html" . -}} {{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} -{{- if (and (in site.Params.mainSections .Type) (ne .Layout `archives`) (ne .Layout `search`) (not $isHLJSdisabled)) }} +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} {{- else}} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - + {{- end}} {{- end }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From e02df37142a6415f0906317b8e3f8052823568c2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:11:06 +0530 Subject: [PATCH 183/669] Revert "fix wrong load stylesheet and JS on multihost (multilingual) #126" Doesn't work with multilingual config with no specific baseurl This reverts commit ad79fdaf830e9df84a154510d67011c9e6d709a5. --- layouts/partials/footer.html | 4 ++-- layouts/partials/head.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 62118c3c..276a76af 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -21,11 +21,11 @@ {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} - {{- else}} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} - + {{- end}} {{- end }} + {{- else}} {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} - + {{- end}} {{- end -}} From 757a3094b2ac56f750e8e4f832816937fdf17c37 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 19:21:59 +0530 Subject: [PATCH 184/669] add drop-shadow to show go-to-top button on code-bg in light mode --- assets/css/footer.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/css/footer.css b/assets/css/footer.css index 2ccb160d..11cc29a6 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -40,6 +40,11 @@ transition: visibility .5s, opacity .8s linear } +.top-link, +.top-link svg { + filter: drop-shadow(0px 0px 0px var(--theme)); +} + .footer a:hover, .top-link:hover { color: var(--primary) From 2c9efe204a9bb0b6210367148c5f8579c57e20fd Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:30:44 +0530 Subject: [PATCH 185/669] Update README.md link refs to wiki instead of demo --- README.md | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index afd499c9..019ea58c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg) -![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod) -[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod) -![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) - # PaperMod | [Demo](https://adityatelange.github.io/hugo-PaperMod/) ☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive @@ -15,6 +9,12 @@ The [demo site](https://adityatelange.github.io/hugo-PaperMod/) includes a lot o ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with exampleSite as source. +![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg) +![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod) +[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/hugo-papermod/) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_hugo-PaperMod) +![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod) + ---

@@ -24,19 +24,13 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu --- -## Install/Update 📥 - -Read this post For More Details => [hugo-PaperMod - Installation](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/) - ---- - ## Features/Mods 💥 - Uses Hugo's asset generator with pipelining, fingerprinting, bundling and minification by default. - 3 Modes: - - Regular Mode. - - [Home-Info Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#home-info-mode) - - [Profile Mode.](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/#profile-mode) + - [Regular Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#regular-mode-default-mode) + - [Home-Info Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#home-info-mode) + - [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode) - Table of Content Generation (newer implementation). - Archive of posts. - Social Icons (home-info and profile-mode) @@ -48,26 +42,34 @@ Read this post For More Details => [hugo-PaperMod - Installation](https://aditya - Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button). - SEO Friendly. - Muliple Author support. -- Search Page +- Search Page with Fuse.js - No webpack, nodejs and other depedencies required to edit the theme. -Read this post For More Details => [hugo-PaperMod - Features](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-features/) +Read this post For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** -Release ChangeLog has info about stuff added: [Releases](https://github.com/adityatelange/hugo-PaperMod/releases) +--- -Huge thanks to contributors for making this theme better 🙌 +## Install/Update 📥 + +Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation)** --- ## Social-Icons/Share-Icons 🖼️ -Read this post For More Details => [Social-Icons](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-icons/) +Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)** --- -## FAQs / How To's 🙋 +## FAQs / How To's Guide 🙋 -Read this post For More Details => [How To's Guide](https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-how-to/) +Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** + +--- + +## Release Changelog + +Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** --- @@ -77,7 +79,7 @@ Read this post For More Details => [How To's Guide](https://adityatelange.github ## Special Thanks 🌟 -- [**Highlight.js**](https://github.com/highlightjs/highlight.js) -- [**Fuse.js**](https://github.com/krisk/fuse) -- [**Feather Icons**](https://github.com/feathericons/feather) -- **All Contributors and Supporters** +- [**Highlight.js**](https://github.com/highlightjs/highlight.js) +- [**Fuse.js**](https://github.com/krisk/fuse) +- [**Feather Icons**](https://github.com/feathericons/feather) +- **All Contributors and Supporters** From 0af2e50d893240d1a196063ce89301cf24f82ac7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 21:41:54 +0530 Subject: [PATCH 186/669] rm redundant styleing from profile-mode --- assets/css/profile-mode.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/assets/css/profile-mode.css b/assets/css/profile-mode.css index 64b7b929..3b269596 100644 --- a/assets/css/profile-mode.css +++ b/assets/css/profile-mode.css @@ -17,11 +17,6 @@ padding: 12px 0 } -.profile .profile_inner span { - padding: 10px 0; - font-size: 18px -} - .profile img { display: inline-table; border-radius: 50%; @@ -49,4 +44,3 @@ .button:active { transform: scale(.96) } - From 565c36fdb06b55b1a90fbaf1dee74bb582ffdd08 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Wed, 20 Jan 2021 22:00:17 +0530 Subject: [PATCH 187/669] Update README.md correct minor mistakes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 019ea58c..1b13fae1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu ---

- HomeInfo + HomeInfo HomeInfo

@@ -45,7 +45,7 @@ ExampleSite can be found here: [exampleSite](https://github.com/adityatelange/hu - Search Page with Fuse.js - No webpack, nodejs and other depedencies required to edit the theme. -Read this post For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** +Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)** --- From f5c554624948742923d3af2af9b6bfd9fe7983a8 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 21 Jan 2021 21:16:44 +0530 Subject: [PATCH 188/669] fix gist colors hide anchor underline for gist --- assets/css/post-single.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index ce7b1d19..1415431c 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -64,7 +64,7 @@ font-size: 12px } -.post-content a, +.post-content a:not(.gist a), .toc a:hover { box-shadow: 0 1px 0 } @@ -127,7 +127,7 @@ } .post-content table th, -.post-content:not(.gist) > table:not(.highlighttable) td { +.post-content table:not(.highlighttable, .highlight table, .gist .highlight) td { min-width: 80px; padding: 12px 8px; line-height: 1.5; @@ -143,7 +143,7 @@ margin: auto 0 } -.post-content:not(.gist) > .highlight, +.post-content .highlight:not(.gist .highlight), .post-content pre { margin: auto 0 20px; background: var(--hljs-bg) !important; From 3167acd32a2a2eb678e399b528b1ef3b9ffc41c5 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 21 Jan 2021 23:31:17 +0530 Subject: [PATCH 189/669] fix code highlight spacing when in a list rm redundant code --- assets/css/post-single.css | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 1415431c..2729dba6 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -145,7 +145,7 @@ .post-content .highlight:not(.gist .highlight), .post-content pre { - margin: auto 0 20px; + margin: 10px auto; background: var(--hljs-bg) !important; border-radius: var(--radius) } @@ -162,10 +162,6 @@ margin: 0 } -.post-content .highlight { - margin: 10px auto -} - .post-content .highlighttable { table-layout: fixed } From a8316f00738d2eef92adc5ddbed5ac01f8755334 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 21 Jan 2021 23:35:38 +0530 Subject: [PATCH 190/669] fix code highlight radius when markup.highlight.lineNos is enabled --- assets/css/post-single.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 2729dba6..9dc3caf0 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -143,6 +143,10 @@ margin: auto 0 } +.post-content .highlight table { + border-radius: var(--radius) +} + .post-content .highlight:not(.gist .highlight), .post-content pre { margin: 10px auto; From 042f4e9254450bf03792b3b1e2f359922a8339c4 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 22 Jan 2021 10:51:11 +0530 Subject: [PATCH 191/669] fix code-borders were rounded on desktop but not on mobile devices --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 9dc3caf0..5e8940e3 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -147,7 +147,7 @@ border-radius: var(--radius) } -.post-content .highlight:not(.gist .highlight), +.post-content .highlight:not(table), .post-content pre { margin: 10px auto; background: var(--hljs-bg) !important; From 2c67ae98774bb5e1d0fc6539688f9f29899b19cb Mon Sep 17 00:00:00 2001 From: Corban Mailloux Date: Fri, 22 Jan 2021 01:22:00 -0500 Subject: [PATCH 192/669] Allow page-specific cover settings to win. (#185) check for front-matter's cover.hidden before global config's --- layouts/_default/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index df77d47a..84a322be 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -31,7 +31,7 @@
{{- end}} - {{- $isHidden := ((.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInSingle) | default .Params.cover.hidden )}} + {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden}} {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }} {{- if (.Param "ShowToc") }}
From fc28fa7493024da3a1b83fdf3a82fab196ab237a Mon Sep 17 00:00:00 2001 From: Muhammad Hanif Date: Sat, 23 Jan 2021 17:19:51 +0700 Subject: [PATCH 193/669] Add meta tag for yandex site verification (#187) usage in site config => params: analytics: yandex: SiteVerificationTag: xxxxxxxxxxxxxxxx --- layouts/partials/head.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a54e280e..86e13f55 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -20,6 +20,9 @@ {{- if .Site.Params.analytics.google.SiteVerificationTag }} {{- end}} +{{- if .Site.Params.analytics.yandex.SiteVerificationTag }} + +{{- end}} {{- $common := (resources.Match "css/*.css") | resources.Concat "assets/css/common.css" }} {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} From be1ea5391027469e2330b81390e707b2aae69c57 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 23 Jan 2021 17:03:33 +0530 Subject: [PATCH 194/669] rm selector hiding anchor links on some devices fix: #189 partial revert of f5c554624948742923d3af2af9b6bfd9fe7983a8 --- assets/css/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/post-single.css b/assets/css/post-single.css index 5e8940e3..afa6b1d5 100644 --- a/assets/css/post-single.css +++ b/assets/css/post-single.css @@ -64,7 +64,7 @@ font-size: 12px } -.post-content a:not(.gist a), +.post-content a, .toc a:hover { box-shadow: 0 1px 0 } From 24afe952b2db311b7d30d309cef9002526fe197a Mon Sep 17 00:00:00 2001 From: Daksh Date: Sat, 23 Jan 2021 17:21:52 +0530 Subject: [PATCH 195/669] Add social icon for snapchat (#188) Credits for icon: https://simpleicons.org/?q=snapchat --- layouts/partials/svg.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 03de65a2..3ca871b7 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -295,6 +295,10 @@ +{{- else if (eq $icon_name "snapchat") -}} + + + {{- else if (eq $icon_name "sourcerer") -}} From b6842db0a5a499446947938ffd1bfbcb7c5debb8 Mon Sep 17 00:00:00 2001 From: Florian Kohrt Date: Sun, 24 Jan 2021 13:22:45 +0100 Subject: [PATCH 196/669] Only show vertical bar if necessary in post-meta (#193) fixes unnecessary "|" shown when post-meta is empty but translations are available --- layouts/_default/single.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 84a322be..3e5a43b3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,8 @@ {{- if not (.Param "hideMeta") }}
{{- end }} From bc4d4153dc4eb114c1c4fbca3615d21eac13e7b2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 24 Jan 2021 18:05:00 +0530 Subject: [PATCH 198/669] add hideMeta param to list - same as in single - allows hiding meta in list pages --- layouts/_default/list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b6ddbfa5..9d805c50 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -44,9 +44,11 @@

{{ .Summary | plainify | htmlUnescape }}...

{{- end }} + {{- if not (.Param "hideMeta") }}
{{- partial "post_meta.html" . -}}
+ {{- end }} {{- end }} From f7dbf75d5b91cbe97bb82579aad8defa98c42402 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 24 Jan 2021 18:07:17 +0530 Subject: [PATCH 199/669] allow setting ShowReadingTime per-page as well as site-wide --- layouts/_default/single.html | 2 +- layouts/partials/post_meta.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d9761983..84b70d5d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,7 +13,7 @@