Maintainance updates (#2)
* delicious and google bookmarks discontinued * delicious and google bookmarks discontinued * fix: i18n keys * Social services i18n keys had "line" as a key, fixed accordingly. * fix: added missing share services Added "telegram" and "whatsapp" in the list. * fix: breadcrumb not turning-off when in term list When breadcrumb is turned-off in config file, it remains available in `/categories/{term}/` and `/tags/{term}/ ` list view. * fix: breadcrumb not turning-off when set in config Fixed breadcrumb showing in "Section List" regardless of "false" setting in config params. * upd: deprecated in Hugo v0.119.0, removed in Hugo v0.125.0 * fix: use hugo.IsServer as .Site.IsServer is deprecated --------- Co-authored-by: I'M YourOnly.One <1079205+techmagus@users.noreply.github.com> Co-authored-by: techmagus <techmagus@im.youronly.one>
This commit is contained in:
parent
4736bfca22
commit
eeac3af99b
|
@ -199,7 +199,7 @@ commento = false
|
|||
paypal = ""
|
||||
patreon = ""
|
||||
|
||||
# possible share name: ["facebook","twitter", "reddit", "linkedin", "tumblr", "weibo", "douban", "line", "pocket", "feedly", "hatena", "pinterest", "delicious", "google"]
|
||||
# possible share name: ["facebook", "twitter", "reddit", "linkedin", "tumblr", "weibo", "douban", "line", "telegram", "whatsapp", "pocket", "feedly", "hatena", "pinterest"]
|
||||
[[share]]
|
||||
name = "facebook"
|
||||
username = ""
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
|
||||
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq ($.Param "sidebarPosition") "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
|
||||
{{ if $.Param "enableBreadcrumb" }}
|
||||
{{ partial "body/breadcrumb" . }}
|
||||
{{ end }}
|
||||
<header class="list__header">
|
||||
<h5 class="list__header--title capitalize h5">{{.Title}}</h5>
|
||||
</header>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
|
||||
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq ($.Param "sidebarPosition") "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
|
||||
{{ if $.Param "enableBreadcrumb" }}
|
||||
{{ partial "body/breadcrumb" . }}
|
||||
{{ end }}
|
||||
<header class="list__header">
|
||||
<h5 class="list__header--title capitalize h5">{{ .Title }}</h5>
|
||||
</header>
|
||||
|
|
|
@ -40,37 +40,29 @@
|
|||
{{ partial "svgs/share/line.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "telegram" }}
|
||||
<a href='https://telegram.me/share/url?url=' onclick='window.open('https://telegram.me/share/url?url='+encodeURIComponent(location.href)+'&bodytext=&tags=&text='+encodeURIComponent(document.title));return false;' class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "line" | default "Telegram" }}" aria-label="Telegram Share Button" data-type="share">
|
||||
<a href='https://telegram.me/share/url?url=' onclick='window.open('https://telegram.me/share/url?url='+encodeURIComponent(location.href)+'&bodytext=&tags=&text='+encodeURIComponent(document.title));return false;' class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "telegram" | default "Telegram" }}" aria-label="Telegram Share Button" data-type="share">
|
||||
{{ partial "svgs/social/telegram.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "whatsapp" }}
|
||||
<a href="https://web.whatsapp.com/send?text={{ $ctx.Title }} - {{ $ctx.Permalink | absLangURL }}" data-href="{{ $ctx.Permalink | absLangURL }}" class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "line" | default "WhatsApp" }}" aria-label="WhatsApp Share Button" data-type="share">
|
||||
<a href="https://web.whatsapp.com/send?text={{ $ctx.Title }} - {{ $ctx.Permalink | absLangURL }}" data-href="{{ $ctx.Permalink | absLangURL }}" class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "whatsapp" | default "WhatsApp" }}" aria-label="WhatsApp Share Button" data-type="share">
|
||||
{{ partial "svgs/social/whatsapp.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "pocket" }}
|
||||
<a href="https://getpocket.com/save?url={{ $ctx.Permalink | absLangURL }}" class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "line" | default "Pocket" }}" aria-label="Pocket Share Button" data-type="share">
|
||||
<a href="https://getpocket.com/save?url={{ $ctx.Permalink | absLangURL }}" class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "pocket" | default "Pocket" }}" aria-label="Pocket Share Button" data-type="share">
|
||||
{{ partial "svgs/share/pocket.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "feedly" }}
|
||||
<a href="https://feedly.com/i/subscription/feed/{{ .Permalink | absLangURL }}index.xml" class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "line" | default "Feedly" }}" aria-label="Feedly Share Button" data-type="share">
|
||||
<a href="https://feedly.com/i/subscription/feed/{{ .Permalink | absLangURL }}index.xml" class="donation__item" target="_blank" rel="noreferrer" title="{{ i18n "feedly" | default "Feedly" }}" aria-label="Feedly Share Button" data-type="share">
|
||||
{{ partial "svgs/share/feedly.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "hatena" }}
|
||||
<a href="https://b.hatena.ne.jp/entry/panel/?btitle={{ $ctx.Title }}&url={{ $ctx.Permalink | absLangURL }}" title="{{ i18n "Hatena Blog" | default "Hatena Blog" }}" aria-label="Hatena Blog Share Button" class="donation__item" target="_blank" rel="noreferrer" data-type="share">
|
||||
<a href="https://b.hatena.ne.jp/entry/panel/?btitle={{ $ctx.Title }}&url={{ $ctx.Permalink | absLangURL }}" title="{{ i18n "hatena" | default "Hatena Blog" }}" aria-label="Hatena Blog Share Button" class="donation__item" target="_blank" rel="noreferrer" data-type="share">
|
||||
{{ partial "svgs/share/hatena.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "pinterest" }}
|
||||
<a href="http://www.pinterest.com/pin/create/button/?url={{ $ctx.Permalink | absLangURL }}{{ if $.Param "featured_image" }}&media={{ (print "images/" ($.Param "featured_image")) | absURL }}{{ else if $.Param "image" }}&media={{ $.Param "image" | absURL }}{{end}}&description={{ $ctx.Description }}" title="{{ i18n "Pinterest" | default "Pinterest" }}" aria-label="Pinterest Share Button" class="donation__item" target="_blank" rel="noreferrer" data-type="share">
|
||||
<a href="http://www.pinterest.com/pin/create/button/?url={{ $ctx.Permalink | absLangURL }}{{ if $.Param "featured_image" }}&media={{ (print "images/" ($.Param "featured_image")) | absURL }}{{ else if $.Param "image" }}&media={{ $.Param "image" | absURL }}{{end}}&description={{ $ctx.Description }}" title="{{ i18n "pinterest" | default "Pinterest" }}" aria-label="Pinterest Share Button" class="donation__item" target="_blank" rel="noreferrer" data-type="share">
|
||||
{{ partial "svgs/share/pinterest.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "delicious" }}
|
||||
<a href="http://www.delicious.com/save?url={{ $ctx.Permalink | absLangURL }}&title={{ $ctx.Title }}" title="{{ i18n "Delicious" | default "Delicious" }}" aria-label="Delicious Share Button" class="donation__item" target="_blank" rel="noreferrer" data-type="share">
|
||||
{{ partial "svgs/share/delicious.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ else if eq (lower .name) "google" }}
|
||||
<a href="https://www.google.com/bookmarks/mark?op=add&bkmk={{ $ctx.Permalink | absLangURL }}&title={{ $ctx.Title }}" title="{{ i18n "Google Bookmark" | default "Google Bookmark" }}" aria-label="Google Bookmark Share Button" class="donation__item" target="_blank" rel="noreferrer" data-type="share">
|
||||
{{ partial "svgs/share/google.svg" (dict "width" 35 "height" 35) }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ if and (.Site.Params.baiduAnalytics) (not .Site.IsServer) }}
|
||||
{{ if and (.Site.Params.baiduAnalytics) (not hugo.IsServer) }}
|
||||
<script>
|
||||
{{ $baiduAnalyticsId := .Site.Params.baiduAnalytics }}
|
||||
var baiduAnalyticsId = JSON.parse({{ $baiduAnalyticsId | jsonify }});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{ if and (not .Site.IsServer) (not ($.Param "disableAdsense")) }}
|
||||
{{ if and (not hugo.IsServer) (not ($.Param "disableAdsense")) }}
|
||||
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins
|
||||
class="adsbygoogle"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{{ if not .Site.IsServer }}
|
||||
{{ if not hugo.IsServer }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
|
@ -1,10 +1,10 @@
|
|||
{{ if and ($.Site.Params.googleTagManager) (not .Site.IsServer) }}
|
||||
{{ if and ($.Site.Params.googleTagManager) (not hugo.IsServer) }}
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ $.Site.Params.googleTagManager }}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
{{ end }}
|
||||
|
||||
{{ if and ($.Site.Params.googleTagManager) (not .Site.IsServer) }}
|
||||
{{ if and ($.Site.Params.googleTagManager) (not hugo.IsServer) }}
|
||||
<!-- Google Tag Manager -->
|
||||
<!-- create dataLayer -->
|
||||
<script>
|
||||
|
|
Loading…
Reference in New Issue