From 4e2558d93c59c3229d2b856c164b66e1e2580df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Salcedo=20Garc=C3=ADa?= Date: Fri, 24 Dec 2021 15:59:27 +0100 Subject: [PATCH 01/63] Add missing spanish translations (#684) --- i18n/es.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/i18n/es.yaml b/i18n/es.yaml index 38d2239..0d3d69a 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -14,3 +14,12 @@ - id: translations translation: "Traducciones" + +- id: home + translation: "Inicio" + +- id: code_copy + translation: "copiar" + +- id: code_copied + translation: "¡copiado!" \ No newline at end of file From c59193fc48c104389d8b3e9e6857c7aa46221a92 Mon Sep 17 00:00:00 2001 From: Saxodwarf <40502346+Saxodwarf@users.noreply.github.com> Date: Sun, 26 Dec 2021 09:22:10 +0100 Subject: [PATCH 02/63] Use hugo 0.87's date formatting feature with time.Format (#555) --- layouts/partials/post_meta.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 4f86d4a..9225f13 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -1,7 +1,7 @@ {{- $scratch := newScratch }} {{- if not .Date.IsZero -}} -{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }} +{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }} {{- end }} {{- if (.Param "ShowReadingTime") -}} From 72abf7440a0770d869b86733b11bb18f20f1f0da Mon Sep 17 00:00:00 2001 From: Haseop Lee Date: Sun, 9 Jan 2022 14:49:12 +0900 Subject: [PATCH 03/63] Add korean translations (#713) --- i18n/ko.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/i18n/ko.yaml b/i18n/ko.yaml index 129ad73..db0bcc7 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -3,3 +3,23 @@ - id: next_page translation: "다음 페이지" + +- id: read_time + translation: + one : "1 분" + other: "{{ .Count }} 분" + +- id: toc + translation: "목차" + +- id: translations + translation: "번역" + +- id: home + translation: "홈페이지" + +- id: code_copy + translation: "복사" + +- id: code_copied + translation: "복사완료!" From 0fe857539b26f408847095ee33ee842f60b6b4a7 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 13 Jan 2022 20:35:56 +0530 Subject: [PATCH 04/63] Add `absURL` to `label.icon` and `profileMode.imageUrl` fixes: #622 #623 --- layouts/partials/header.html | 2 +- layouts/partials/index_profile.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f53ab52..cc63659 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -46,7 +46,7 @@ {{- if .Site.Title }} {{- if .Site.Params.label.icon }} - logo {{- end -}} {{- $label_text -}} diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index b7753f9..4e961ba 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -2,7 +2,7 @@ {{- with .Site.Params.profileMode }}
{{- if .imageUrl -}} - {{ .imageTitle | default {{- end }}

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

From 587ab1672594ed4efb6fe9ad8daa72737369c76f Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 13 Jan 2022 21:05:57 +0530 Subject: [PATCH 05/63] Remove `.Page` method being used reference: https://github.com/gohugoio/hugo/releases/tag/v0.92.0 --- layouts/partials/cover.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html index 8ba2cd3..b4e7c78 100644 --- a/layouts/partials/cover.html +++ b/layouts/partials/cover.html @@ -4,7 +4,7 @@
{{- $responsiveImages := (.Params.cover.responsiveImages | default .Site.Params.cover.responsiveImages) | default true }} {{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }} - {{- $cover := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- if $cover -}}{{/* i.e it is present in page bundle */}} {{- if $addLink }}{{ end -}} From 54a3c6073518005182f3c3250ddb7e8c0cacd7ad Mon Sep 17 00:00:00 2001 From: janga1 <35235201+janga1@users.noreply.github.com> Date: Thu, 13 Jan 2022 16:51:03 +0100 Subject: [PATCH 06/63] Adding 'Phone' to Socials (#635) --- layouts/partials/svg.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 6e6c287..89446be 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -322,6 +322,12 @@ d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018" style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" /> +{{- else if (eq $icon_name "phone") -}} + + + + + {{- else if (eq $icon_name "polywork") -}}
+ {{- if (.Param "UseHugoToc") }} + {{- .TableOfContents -}} + {{- else }} {{- $largest := 6 -}} {{- range $headers -}} {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} @@ -87,6 +90,7 @@ {{- end -}} {{- end }} + {{- end }}
From c9f7c54ae67614e9af6f4212262411e31aca0f70 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 5 Feb 2022 17:50:49 +0530 Subject: [PATCH 11/63] Rename fuse.js -> fuse.basic.min.js - denoting we are using basic version --- assets/js/{fuse.js => fuse.basic.min.js} | 0 layouts/partials/head.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename assets/js/{fuse.js => fuse.basic.min.js} (100%) diff --git a/assets/js/fuse.js b/assets/js/fuse.basic.min.js similarity index 100% rename from assets/js/fuse.js rename to assets/js/fuse.basic.min.js diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 86ee574..2fabbe6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -72,7 +72,7 @@ {{- if (eq .Layout `search`) -}} {{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" .Site.Params.fuseOpts)) }} -{{- $fusejs := resources.Get "js/fuse.js" }} +{{- $fusejs := resources.Get "js/fuse.basic.min.js" }} {{- if not .Site.Params.assets.disableFingerprinting }} {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} From 81ddc76efb25349f0dcc41ef14143414b13b2fc0 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 5 Feb 2022 17:54:35 +0530 Subject: [PATCH 12/63] Update `fuse.js` v6.4.6 to v6.5.3 basic - https://github.com/krisk/Fuse/releases/tag/v6.5.3 --- assets/js/fuse.basic.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/fuse.basic.min.js b/assets/js/fuse.basic.min.js index 3ca4e66..025c445 100644 --- a/assets/js/fuse.basic.min.js +++ b/assets/js/fuse.basic.min.js @@ -1,9 +1,9 @@ /** - * Fuse.js v6.4.6 - Lightweight fuzzy-search (http://fusejs.io) + * Fuse.js v6.5.3 - Lightweight fuzzy-search (http://fusejs.io) * * Copyright (c) 2021 Kiro Risk (http://kiro.me) * All Rights Reserved. Apache Software License 2.0 * * http://www.apache.org/licenses/LICENSE-2.0 */ -var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(w).length;if(t.has(r))return t.get(r);var i=1/Math.sqrt(r),o=parseFloat(Math.round(i*n)/n);return t.set(r,o),o},clear:function(){t.clear()}}}var _=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?x.getFn:r;t(this,e),this.norm=L(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,u(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?x.getFn:r,o=new _({getFn:i});return o.setKeys(e.map(b)),o.setSources(t),o.create(),o}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?x.distance:s,u=t.ignoreLocation,l=void 0===u?x.ignoreLocation:u,d=r/e.length;if(l)return d;var f=Math.abs(c-o);return h?d+f/h:f?1:d}function A(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function j(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,a=void 0===o?x.location:o,c=i.threshold,s=void 0===c?x.threshold:c,h=i.distance,u=void 0===h?x.distance:h,l=i.includeMatches,d=void 0===l?x.includeMatches:l,f=i.findAllMatches,v=void 0===f?x.findAllMatches:f,y=i.minMatchCharLength,g=void 0===y?x.minMatchCharLength:y,p=i.isCaseSensitive,m=void 0===p?x.isCaseSensitive:p,b=i.ignoreLocation,k=void 0===b?x.ignoreLocation:b;if(t(this,e),this.options={location:a,threshold:s,distance:u,includeMatches:d,findAllMatches:v,minMatchCharLength:g,isCaseSensitive:m,ignoreLocation:k},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var M=function(e,t){r.chunks.push({pattern:e,alphabet:j(e),startIndex:t})},w=this.pattern.length;if(w>32){for(var L=0,_=w%32,S=w-_;L3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?x.location:i,a=r.distance,c=void 0===a?x.distance:a,s=r.threshold,h=void 0===s?x.threshold:s,u=r.findAllMatches,l=void 0===u?x.findAllMatches:u,d=r.minMatchCharLength,f=void 0===d?x.minMatchCharLength:d,v=r.includeMatches,y=void 0===v?x.includeMatches:v,p=r.ignoreLocation,m=void 0===p?x.ignoreLocation:p;if(t.length>32)throw new Error(g(32));for(var b,k=t.length,M=e.length,w=Math.max(0,Math.min(o,M)),L=h,_=w,S=f>1||y,j=S?Array(M):[];(b=e.indexOf(t,_))>-1;){var E=O(t,{currentLocation:b,expectedLocation:w,distance:c,ignoreLocation:m});if(L=Math.min(E,L),_=b+k,S)for(var I=0;I=J;U-=1){var q=U-1,B=n[e.charAt(q)];if(S&&(j[q]=+!!B),T[U]=(T[U+1]<<1|1)&B,$&&(T[U]|=(C[U+1]|C[U])<<1|1|C[U+1]),T[U]&N&&(F=O(t,{errors:$,currentLocation:q,expectedLocation:w,distance:c,ignoreLocation:m}))<=L){if(L=F,(_=q)<=w)break;J=Math.max(1,2*w-_)}}var V=O(t,{errors:$+1,currentLocation:w,expectedLocation:w,distance:c,ignoreLocation:m});if(V>L)break;C=T}var G={isMatch:_>=0,score:Math.max(.001,F)};if(S){var H=A(j,f);H.length?y&&(G.indices=H):G.isMatch=!1}return G}(e,n,i,{location:a+o,distance:s,threshold:h,findAllMatches:u,minMatchCharLength:l,includeMatches:r,ignoreLocation:d}),m=p.isMatch,b=p.score,k=p.indices;m&&(y=!0),v+=b,m&&k&&(f=[].concat(c(f),c(k)))}));var p={isMatch:y,score:y?v/this.chunks.length:1};return y&&r&&(p.indices=f),p}}]),e}(),I=[];function C(e,t){for(var n=0,r=I.length;n-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function N(e,t){t.score=e.score}function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?x.includeMatches:r,o=n.includeScore,a=void 0===o?x.includeScore:o,c=[];return i&&c.push(P),a&&c.push(N),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}var D=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(t(this,e),this.options=a({},x,{},r),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new m(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof _))throw new Error("Incorrect 'index' type");this._myIndex=t||S(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){f(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,a=i.includeScore,c=i.shouldSort,s=i.sortFn,h=i.ignoreFieldNorm,d=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return F(d,{ignoreFieldNorm:h}),c&&d.sort(s),l(r)&&r>-1&&(d=d.slice(0,r)),$(d,this._docs,{includeMatches:o,includeScore:a})}},{key:"_searchStringList",value:function(e){var t=C(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(f(n)){var a=t.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:h}]})}})),r}},{key:"_searchLogical",value:function(e){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(e){var t=this,n=C(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a=[];return o.forEach((function(e){var r=e.$,o=e.i;if(f(r)){var s=[];i.forEach((function(e,i){s.push.apply(s,c(t._findMatches({key:e,value:r[i],searcher:n})))})),s.length&&a.push({idx:o,item:r,matches:s})}})),a}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!f(n))return[];var i=[];if(h(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(f(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,u=c.score,l=c.indices;s&&i.push({score:u,key:t,value:o,norm:a,indices:l})}return i}}]),e}();return D.version="6.4.6",D.createIndex=S,D.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?x.getFn:n,i=e.keys,o=e.records,a=new _({getFn:r});return a.setKeys(i),a.setIndexRecords(o),a},D.config=x,D},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(); \ No newline at end of file +var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(_).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),a=parseFloat(Math.round(o*r)/r);return n.set(i,a),a},clear:function(){n.clear()}}}var O=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?L.getFn:n,o=t.fieldNormWeight,a=void 0===o?L.fieldNormWeight:o;r(this,e),this.norm=S(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return o(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,u(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?L.getFn:r,o=n.fieldNormWeight,a=void 0===o?L.fieldNormWeight:o,c=new O({getFn:i,fieldNormWeight:a});return c.setKeys(e.map(k)),c.setSources(t),c.create(),c}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?L.distance:s,u=t.ignoreLocation,l=void 0===u?L.ignoreLocation:u,d=r/e.length;if(l)return d;var f=Math.abs(c-o);return h?d+f/h:f?1:d}function E(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}var I=32;function C(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,a=void 0===o?L.location:o,c=i.threshold,s=void 0===c?L.threshold:c,h=i.distance,u=void 0===h?L.distance:h,l=i.includeMatches,d=void 0===l?L.includeMatches:l,f=i.findAllMatches,v=void 0===f?L.findAllMatches:f,g=i.minMatchCharLength,y=void 0===g?L.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?L.isCaseSensitive:p,b=i.ignoreLocation,k=void 0===b?L.ignoreLocation:b;if(r(this,e),this.options={location:a,threshold:s,distance:u,includeMatches:d,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:k},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var M=function(e,t){n.chunks.push({pattern:e,alphabet:C(e),startIndex:t})},w=this.pattern.length;if(w>I){for(var x=0,_=w%I,S=w-_;x3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?L.location:i,a=r.distance,c=void 0===a?L.distance:a,s=r.threshold,h=void 0===s?L.threshold:s,u=r.findAllMatches,l=void 0===u?L.findAllMatches:u,d=r.minMatchCharLength,f=void 0===d?L.minMatchCharLength:d,v=r.includeMatches,g=void 0===v?L.includeMatches:v,y=r.ignoreLocation,m=void 0===y?L.ignoreLocation:y;if(t.length>I)throw new Error(p(I));for(var b,k=t.length,M=e.length,w=Math.max(0,Math.min(o,M)),x=h,_=w,S=f>1||g,O=S?Array(M):[];(b=e.indexOf(t,_))>-1;){var A=j(t,{currentLocation:b,expectedLocation:w,distance:c,ignoreLocation:m});if(x=Math.min(A,x),_=b+k,S)for(var C=0;C=T;R-=1){var U=R-1,B=n[e.charAt(U)];if(S&&(O[U]=+!!B),J[R]=(J[R+1]<<1|1)&B,$&&(J[R]|=(F[R+1]|F[R])<<1|1|F[R+1]),J[R]&W&&(N=j(t,{errors:$,currentLocation:U,expectedLocation:w,distance:c,ignoreLocation:m}))<=x){if(x=N,(_=U)<=w)break;T=Math.max(1,2*w-_)}}if(j(t,{errors:$+1,currentLocation:w,expectedLocation:w,distance:c,ignoreLocation:m})>x)break;F=J}var V={isMatch:_>=0,score:Math.max(.001,N)};if(S){var q=E(O,f);q.length?g&&(V.indices=q):V.isMatch=!1}return V}(e,n,i,{location:a+o,distance:s,threshold:h,findAllMatches:u,minMatchCharLength:l,includeMatches:r,ignoreLocation:d}),m=y.isMatch,b=y.score,k=y.indices;m&&(g=!0),v+=b,m&&k&&(f=[].concat(c(f),c(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=f),y}}]),e}(),N=[];function P(e,t){for(var n=0,r=N.length;n-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function D(e,t){t.score=e.score}function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?L.includeMatches:r,o=n.includeScore,a=void 0===o?L.includeScore:o,c=[];return i&&c.push($),a&&c.push(D),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}var T=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(r(this,e),this.options=t(t({},L),i),this.options.useExtendedSearch)throw new Error(y);this._keyStore=new b(this.options.keys),this.setCollection(n,o)}return o(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof O))throw new Error("Incorrect 'index' type");this._myIndex=t||A(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){f(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,a=i.includeScore,c=i.shouldSort,s=i.sortFn,h=i.ignoreFieldNorm,d=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return W(d,{ignoreFieldNorm:h}),c&&d.sort(s),l(r)&&r>-1&&(d=d.slice(0,r)),K(d,this._docs,{includeMatches:o,includeScore:a})}},{key:"_searchStringList",value:function(e){var t=P(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(f(n)){var a=t.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:h}]})}})),r}},{key:"_searchLogical",value:function(e){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(e){var t=this,n=P(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a=[];return o.forEach((function(e){var r=e.$,o=e.i;if(f(r)){var s=[];i.forEach((function(e,i){s.push.apply(s,c(t._findMatches({key:e,value:r[i],searcher:n})))})),s.length&&a.push({idx:o,item:r,matches:s})}})),a}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!f(n))return[];var i=[];if(h(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(f(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,u=c.score,l=c.indices;s&&i.push({score:u,key:t,value:o,norm:a,indices:l})}return i}}]),e}();return T.version="6.5.3",T.createIndex=A,T.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?L.getFn:n,i=t.fieldNormWeight,o=void 0===i?L.fieldNormWeight:i,a=e.keys,c=e.records,s=new O({getFn:r,fieldNormWeight:o});return s.setKeys(a),s.setIndexRecords(c),s},T.config=L,T},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t(); \ No newline at end of file From 06f97458a77e0b9836c90e33db3deeab6832f980 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 5 Feb 2022 18:40:37 +0530 Subject: [PATCH 13/63] Delete FUNDING.yml --- .github/FUNDING.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 6a78a55..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: adityatelange -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: ['https://www.buymeacoffee.com/adityatelange'] From 43c810c3e20bcf04e17a3e26a4ceacd9dfd9f22a Mon Sep 17 00:00:00 2001 From: Jannik Arndt Date: Tue, 15 Feb 2022 15:31:21 +0100 Subject: [PATCH 14/63] Remove duplicate call to hugo.Generator (#786) --- layouts/partials/head.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2fabbe6..0d3fa72 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -104,9 +104,6 @@ -{{- /* Generator */}} -{{ hugo.Generator }} - {{- /* RSS */}} {{ range .AlternativeOutputFormats -}} From 15b984bd215b7c4a73385e76486ec93b0aadcc53 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 11 Mar 2022 19:32:37 +0530 Subject: [PATCH 15/63] Fix `pre` getting a dark background fixes: #723 --- assets/css/common/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 79ccbec..9988572 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -154,7 +154,7 @@ } .post-content .highlight:not(table), -.post-content pre { +.post-content .highlight pre { margin: 10px auto; background: var(--hljs-bg) !important; border-radius: var(--radius); From 912eddde0a79b883fc8fdc88d23d297b8be1bb22 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:31:57 +0530 Subject: [PATCH 16/63] Revert "Fix `pre` getting a dark background" This reverts commit 15b984bd215b7c4a73385e76486ec93b0aadcc53. --- assets/css/common/post-single.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 9988572..79ccbec 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -154,7 +154,7 @@ } .post-content .highlight:not(table), -.post-content .highlight pre { +.post-content pre { margin: 10px auto; background: var(--hljs-bg) !important; border-radius: var(--radius); From 26315a9e4cccb69bc75126c875ff2ab80a7b7547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=81NG=20Xu=C4=9Bru=C3=AC?= <1175567+xen0n@users.noreply.github.com> Date: Fri, 11 Mar 2022 23:06:14 +0800 Subject: [PATCH 17/63] Add icon for Bilibili (#814) The icon is re-drawn by myself to use outlines, referring to the icon used on bilibili.com and the simpleicons version (which all used fills). --- layouts/partials/svg.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 89446be..51a0fc1 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -21,6 +21,14 @@ 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 $icon_name "bilibili") -}} + + + + + + + {{- else if (eq $icon_name "buymeacoffee") -}} Date: Fri, 11 Mar 2022 20:43:51 +0530 Subject: [PATCH 18/63] Add icon for pgp key (#784) --- layouts/partials/svg.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 51a0fc1..31e3af0 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -330,6 +330,12 @@ d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018" style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" /> +{{- else if (eq $icon_name "pgpkey") -}} + + + + {{- else if (eq $icon_name "phone") -}} From 2a1390bef78e6d6456cf1cce3c98aa3927410e77 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:49:27 +0530 Subject: [PATCH 19/63] Match `key` as well for `pgpkey` icon amend to 53fd4bb857d29a651487a77a62c4c91901a1582a --- layouts/partials/svg.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 31e3af0..9b67910 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -330,7 +330,7 @@ d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018" style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" /> -{{- else if (eq $icon_name "pgpkey") -}} +{{- else if or (eq $icon_name "pgpkey") (eq $icon_name "key") -}} From 80928d9f2327809b7ecccf36930e4b726a7d10b2 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 12 Mar 2022 19:33:29 +0530 Subject: [PATCH 20/63] Fix `pre` getting a dark background fixes: #723 --- assets/css/common/post-single.css | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 79ccbec..b9b9709 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -153,8 +153,7 @@ border-radius: var(--radius); } -.post-content .highlight:not(table), -.post-content pre { +.post-content .highlight:not(table) { margin: 10px auto; background: var(--hljs-bg) !important; border-radius: var(--radius); @@ -207,8 +206,8 @@ margin: auto 0; padding: 10px; color: rgb(213, 213, 214); - background: 0 0; - border-radius: 0; + background: var(--hljs-bg) !important; + border-radius: var(--radius); overflow-x: auto; word-break: break-all; } From 42c3c937a1089dd1f48ea113e660a3941a8646a6 Mon Sep 17 00:00:00 2001 From: Emil Erlandsson Date: Sun, 13 Mar 2022 10:56:42 +0100 Subject: [PATCH 21/63] Add Swedish (sv) translation sv.yaml (#829) --- i18n/sv.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 i18n/sv.yaml diff --git a/i18n/sv.yaml b/i18n/sv.yaml new file mode 100644 index 0000000..65ce422 --- /dev/null +++ b/i18n/sv.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "Förra Sidan" + +- id: next_page + translation: "Nästa Sida" + +- id: read_time + translation: + one: "1 min" + other: "{{ .Count }} min" + +- id: toc + translation: "Innehållsförteckning" + +- id: translations + translation: "Översättningar" + +- id: home + translation: "Hem" + +- id: edit_post + translation: "Redigera" + +- id: code_copy + translation: "kopiera" + +- id: code_copied + translation: "kopierad!" From 5a5b0840edbf0dd0d532ab29bfb35c7acf2ade15 Mon Sep 17 00:00:00 2001 From: lavaicer <52038323+lavaicer@users.noreply.github.com> Date: Fri, 18 Mar 2022 00:51:53 +0800 Subject: [PATCH 22/63] Update zh.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit trans words -> 字 (#837) --- i18n/zh.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 7f15ab0..c341e03 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -9,6 +9,11 @@ one : "1 分钟" other: "{{ .Count }} 分钟" +- id: words + translation: + one: "字" + other: {{ .Count }}字 + - id: toc translation: "目录" From 16293e957831c67075e79285a5d04b8964b6a3bc Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Thu, 17 Mar 2022 22:33:05 +0530 Subject: [PATCH 23/63] Add missing quotes to zh: words --- i18n/zh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/zh.yaml b/i18n/zh.yaml index c341e03..959325b 100644 --- a/i18n/zh.yaml +++ b/i18n/zh.yaml @@ -12,7 +12,7 @@ - id: words translation: one: "字" - other: {{ .Count }}字 + other: "{{ .Count }}字" - id: toc translation: "目录" From e83d84012678105cf0ee854fba6e133b84a8e895 Mon Sep 17 00:00:00 2001 From: Fernando Filho Date: Fri, 18 Mar 2022 04:09:20 -0300 Subject: [PATCH 24/63] add social icon for Deezer (#811) Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com> --- layouts/partials/svg.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 9b67910..be78878 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -113,6 +113,11 @@ +{{- else if (eq $icon_name "deezer") -}} + + + {{- else if (eq $icon_name "discogs") -}} Date: Fri, 18 Mar 2022 09:12:56 +0200 Subject: [PATCH 25/63] Add kaggle icon to social icons (#830) --- layouts/partials/svg.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index be78878..7b98927 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -243,6 +243,10 @@ +{{- else if (eq $icon_name "kaggle") -}} + + + {{- else if (eq $icon_name "kakaotalk") -}} From 375155061d42c6d7eb44ad4fe980d4ae021de66b Mon Sep 17 00:00:00 2001 From: Philipp Bastian <98668015+bikeophilipp@users.noreply.github.com> Date: Fri, 18 Mar 2022 08:31:37 +0100 Subject: [PATCH 26/63] Add icons for 'komoot' and 'letterboxd' (#799) * Add 'komoot' and 'letterboxd' icon to svg.html --- layouts/partials/svg.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index 7b98927..f8f8963 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -271,11 +271,19 @@ +{{- else if (eq $icon_name "komoot") -}} + + + {{- else if (eq $icon_name "lastfm") -}} +{{- else if (eq $icon_name "letterboxd") -}} + + + {{- else if (eq $icon_name "liberapay") -}} From 496b84659727bc2403214a56778edca7fc7597eb Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 25 Mar 2022 19:48:54 +0530 Subject: [PATCH 27/63] Removing unit from `img`'s height attribute for label.icon https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-height --- layouts/partials/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index cc63659..f95a7a6 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -47,7 +47,7 @@ {{- if .Site.Params.label.icon }} logo + height="{{- .Site.Params.label.iconHeight | default "30" -}}"> {{- end -}} {{- $label_text -}} From 975972e04181007c61302054d18735dc440a0586 Mon Sep 17 00:00:00 2001 From: Chiahong <36815907+ChiahongHong@users.noreply.github.com> Date: Fri, 25 Mar 2022 22:21:23 +0800 Subject: [PATCH 28/63] Update Taiwanese Chinese translation (#848) --- i18n/zh-tw.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index c6b0e7f..7b9d9db 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -9,6 +9,11 @@ one : "1 分鐘" other: "{{ .Count }} 分鐘" +- id: words + translation: + one: "字" + other: "{{ .Count }} 字" + - id: toc translation: "目錄" From 575cc0ca8c4e5904c7ae77e76db812c52e5f8ed1 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 27 Mar 2022 18:44:06 +0530 Subject: [PATCH 29/63] Use `site` function instead of `.Site` or `$.Site` - The site function provides global access to the same data as the .Site page method. - Current context (`.`) is never considered. --- layouts/_default/archives.html | 2 +- layouts/_default/baseof.html | 4 +- layouts/_default/index.json | 2 +- layouts/_default/list.html | 8 +-- layouts/_default/rss.xml | 22 ++++---- layouts/_default/single.html | 4 +- layouts/_default/terms.html | 2 +- layouts/partials/author.html | 4 +- layouts/partials/breadcrumbs.html | 4 +- layouts/partials/cover.html | 6 +- layouts/partials/edit_post.html | 8 +-- layouts/partials/footer.html | 12 ++-- layouts/partials/head.html | 56 +++++++++---------- layouts/partials/header.html | 30 +++++----- layouts/partials/home_info.html | 4 +- layouts/partials/index_profile.html | 6 +- layouts/partials/post_canonical.html | 4 +- layouts/partials/post_meta.html | 2 +- layouts/partials/templates/opengraph.html | 10 ++-- layouts/partials/templates/schema_json.html | 28 +++++----- layouts/partials/templates/twitter_cards.html | 6 +- layouts/partials/translation_list.html | 4 +- layouts/robots.txt | 2 +- 23 files changed, 115 insertions(+), 115 deletions(-) diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 435d2a1..e400e2c 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -11,7 +11,7 @@ {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} -{{- if .Site.Params.ShowAllPagesInArchive }} +{{- if site.Params.ShowAllPagesInArchive }} {{- $pages = site.RegularPages }} {{- end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6dfe741..3d13f07 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . }} @@ -9,7 +9,7 @@ {{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}} {{- print "list" -}} {{- end -}} -{{- if eq $.Site.Params.defaultTheme `dark` -}} +{{- if eq site.Params.defaultTheme `dark` -}} {{- print " dark" }} {{- end -}} " id="top"> diff --git a/layouts/_default/index.json b/layouts/_default/index.json index 2c86f7c..feeb437 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -1,5 +1,5 @@ {{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} +{{- range site.RegularPages -}} {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} {{- end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 0cc1ad9..f4ff6ec 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,6 @@ {{- define "main" }} -{{- if (and .Site.Params.profileMode.enabled .IsHome) }} +{{- if (and site.Params.profileMode.enabled .IsHome) }} {{- partial "index_profile.html" . }} {{- else }} {{/* if not profileMode */}} @@ -32,7 +32,7 @@ {{- $paginator := .Paginate $pages }} -{{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} +{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} {{- partial "home_info.html" . }} {{- end }} @@ -41,7 +41,7 @@ {{- $class := "post-entry" }} -{{- $user_preferred := or .Site.Params.disableSpecial1stPost .Site.Params.homeInfoParams }} +{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} {{- $class = "first-entry" }} {{- else if $term }} @@ -49,7 +49,7 @@ {{- end }}
- {{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList) }} + {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }} {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}

diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index eca41b7..134d50d 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,31 +1,31 @@ {{- $pctx := . -}} -{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- if .IsHome -}}{{ $pctx = site }}{{- end -}} {{- $pages := slice -}} {{- if or $.IsHome $.IsSection -}} {{- $pages = $pctx.RegularPages -}} {{- else -}} {{- $pages = $pctx.Pages -}} {{- end -}} -{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- $limit := site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} {{- printf "" | safeHTML }} - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }} {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - {{- with $.Site.Params.images }} + Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }} + {{- with site.Params.images }} {{ index . 0 | absURL }} {{ index . 0 | absURL }} {{- end }} - Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} - {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + Hugo -- gohugo.io{{ with site.LanguageCode }} + {{.}}{{end}}{{ with site.Author.email }} + {{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}}{{ with site.Author.email }} + {{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}}{{ with site.Copyright }} {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" -}} @@ -37,10 +37,10 @@ {{ .Title }} {{ .Permalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}} {{ .Permalink }} {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} - {{- if .Site.Params.ShowFullTextinRSS }} + {{- if site.Params.ShowFullTextinRSS }} {{ (printf "" .Content) | safeHTML }} {{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1d983fd..d313500 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -21,7 +21,7 @@ {{- end }}

- {{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.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") }} {{- partial "toc.html" . }} @@ -46,7 +46,7 @@ {{- if (.Param "ShowPostNavLinks") }} {{- partial "post_nav_links.html" . }} {{- end }} - {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }} + {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} {{- partial "share_icons.html" . -}} {{- end }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index d5a9e66..6fd2654 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -16,7 +16,7 @@ {{- range $key, $value := .Data.Terms.Alphabetical }} {{- $name := .Name }} {{- $count := .Count }} - {{- with $.Site.GetPage (printf "/%s/%s" $type $name) }} + {{- with site.GetPage (printf "/%s/%s" $type $name) }}
  • {{ .Name }} {{ $count }}
  • diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 4582b12..8f2758f 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -1,5 +1,5 @@ -{{- if or .Params.author .Site.Params.author }} -{{- $author := (.Params.author | default .Site.Params.author) }} +{{- if or .Params.author site.Params.author }} +{{- $author := (.Params.author | default site.Params.author) }} {{- $author_type := (printf "%T" $author) }} {{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} {{- (delimit $author ", " ) }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index 742254a..7e8257b 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -1,6 +1,6 @@ {{- if (.Param "ShowBreadCrumbs") -}}