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'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d0d4c6..2da8f8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,11 @@ on: - exampleSite workflow_dispatch: # manual run + inputs: + hugoVersion: + description: "Hugo Version" + required: false + default: "0.83.0" jobs: build: @@ -26,7 +31,7 @@ jobs: - name: Setup hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.83.0' + hugo-version: "${{ github.event.inputs.hugoVersion }}" - name: Build run: hugo --buildDrafts --gc --verbose --minify diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1ec9e57..75033f8 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,14 +3,19 @@ name: Build GH-Pages on: push: paths-ignore: - - 'images/**' - - 'LICENSE' - - 'README.md' + - "images/**" + - "LICENSE" + - "README.md" branches: - master - exampleSite workflow_dispatch: # manual run + inputs: + hugoVersion: + description: "Hugo Version" + required: false + default: "0.83.0" jobs: deploy: @@ -30,7 +35,7 @@ jobs: - name: Setup hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.83.0' + hugo-version: "${{ github.event.inputs.hugoVersion }}" - name: Build run: hugo --buildDrafts --gc --verbose --minify diff --git a/LICENSE b/LICENSE index 85e428e..1580f7f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ MIT License Copyright (c) 2020 nanxiaobei and adityatelange -Copyright (c) 2021 adityatelange +Copyright (c) 2021-2022 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 diff --git a/README.md b/README.md index ce755c7..286617a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of doc [![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/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) +[![Discord](https://img.shields.io/discord/971046860317921340?label=Discord)](https://discord.gg/ahpmTvhVmp) --- @@ -71,13 +72,13 @@ Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange --- -## Release Changelog +## Release Changelog 📃 Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** --- -## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/) +## [Pagespeed Insights (100% ?)](https://pagespeed.web.dev/report?url=https://adityatelange.github.io/hugo-PaperMod/) 👀 --- @@ -88,3 +89,8 @@ Release ChangeLog has info about stuff added: **[Releases](https://github.com/ad - [**Feather Icons**](https://github.com/feathericons/feather) - [**Simple Icons**](https://github.com/simple-icons/simple-icons) - **All Contributors and Supporters** + +## Stargazers over time 📈 + +[![Stargazers over time](https://starchart.cc/adityatelange/hugo-PaperMod.svg)](https://starchart.cc/adityatelange/hugo-PaperMod) + diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 79ccbec..675bb68 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -153,11 +153,11 @@ 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); + direction: ltr; } .post-content li > .highlight { @@ -207,8 +207,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; } @@ -223,8 +223,7 @@ margin: 30px 0; height: 2px; background: var(--tertiary); - border-top: 0; - border-bottom: 0; + border: 0; } .post-content iframe { @@ -428,3 +427,7 @@ h6:hover .anchor { [dir="rtl"] .paginav .next { text-align: left; } + +h1>a>svg { + display: inline; +} \ No newline at end of file diff --git a/assets/js/fuse.basic.min.js b/assets/js/fuse.basic.min.js new file mode 100644 index 0000000..025c445 --- /dev/null +++ b/assets/js/fuse.basic.min.js @@ -0,0 +1,9 @@ +/** + * 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(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 diff --git a/assets/js/fuse.js b/assets/js/fuse.js deleted file mode 100644 index 3ca4e66..0000000 --- a/assets/js/fuse.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Fuse.js v6.4.6 - 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 diff --git a/i18n/de.yaml b/i18n/de.yaml index fcb5330..4725419 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -6,8 +6,13 @@ - id: read_time translation: - one: "1 min" - other: "{{ .Count }} min" + one: "1 Minute" + other: "{{ .Count }} Minuten" + +- id: words + translation: + one : "Wort" + other: "{{ .Count }} Wörter" - id: toc translation: "Inhaltsverzeichnis" @@ -15,5 +20,14 @@ - id: translations translation: "Übersetzungen" +- id: home + translation: "Home" + - id: edit_post translation: "Bearbeiten" + +- id: code_copy + translation: "Kopieren" + +- id: code_copied + translation: "Kopiert!" diff --git a/i18n/en.yaml b/i18n/en.yaml index 24d11f9..3a1e215 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,14 +1,19 @@ - id: prev_page - translation: "Prev Page" + translation: "Prev" - id: next_page - translation: "Next Page" + translation: "Next" - id: read_time translation: one : "1 min" other: "{{ .Count }} min" +- id: words + translation: + one : "word" + other: "{{ .Count }} words" + - id: toc translation: "Table of Contents" @@ -18,6 +23,9 @@ - id: home translation: "Home" +- id: edit_post + translation: "Edit" + - id: code_copy translation: "copy" diff --git a/i18n/es.yaml b/i18n/es.yaml index 38d2239..52a559c 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -1,16 +1,33 @@ - id: prev_page - translation: "Página anterior" + translation: "Anterior" - id: next_page - translation: "Página siguiente" + translation: "Siguiente" - id: read_time translation: one : "1 min" other: "{{ .Count }} min" +- id: words + translation: + one : "palabra" + other: "{{ .Count }} palabras" + - id: toc translation: "Tabla de Contenidos" - id: translations translation: "Traducciones" + +- id: home + translation: "Inicio" + +- id: edit_post + translation: "Editar" + +- id: code_copy + translation: "copiar" + +- id: code_copied + translation: "¡copiado!" diff --git a/i18n/fr.yaml b/i18n/fr.yaml index 2e65211..b074c10 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -1,16 +1,21 @@ - id: prev_page - translation: "Page Précédente" + translation: "Page précédente" - id: next_page - translation: "Page Suivante" + translation: "Page suivante" - id: read_time translation: one : "1 min" other: "{{ .Count }} min" +- id: words + translation: + one : "mot" + other: "{{ .Count }} mots" + - id: toc - translation: "Table des Matières" + translation: "Table des matières" - id: translations translation: "Traductions" @@ -22,7 +27,7 @@ translation: "Modifier" - id: code_copy - translation: "copier" + translation: "Copier" - id: code_copied - translation: "copié!" + translation: "Copié !" diff --git a/i18n/it.yaml b/i18n/it.yaml index 58de606..ef41db4 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -9,6 +9,11 @@ one: "1 minuto" other: "{{ .Count }} minuti" +- id: words + translation: + one : "parola" + other: "{{ .Count }} parole" + - id: toc translation: "Tabella dei Contenuti" diff --git a/i18n/ko.yaml b/i18n/ko.yaml index 129ad73..777dd93 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -3,3 +3,31 @@ - id: next_page translation: "다음 페이지" + +- id: read_time + translation: + one : "1 분" + other: "{{ .Count }} 분" + +- id: words + translation: + one : "단어" + other: "{{ .Count }} 단어" + +- id: toc + translation: "목차" + +- id: translations + translation: "번역" + +- id: home + translation: "홈" + +- id: edit_post + translation: "편집" + +- id: code_copy + translation: "복사" + +- id: code_copied + translation: "복사 완료!" diff --git a/i18n/ms.yaml b/i18n/ms.yaml new file mode 100644 index 0000000..d8a9eff --- /dev/null +++ b/i18n/ms.yaml @@ -0,0 +1,28 @@ +- id: prev_page + translation: "Halaman Sebelumnya" + +- id: next_page + translation: "Halaman Seterusnya" + +- id: read_time + translation: + one: "1 minit" + other: "{{ .Count }} minit" + +- id: toc + translation: "Isi Kandungan" + +- id: translations + translation: "Terjemahan" + +- id: home + translation: "Home" + +- id: edit_post + translation: "Sunting" + +- id: code_copy + translation: "Salin" + +- id: code_copied + translation: "Disalin!" diff --git a/i18n/nl.yaml b/i18n/nl.yaml index 63a9931..e9d06fa 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -9,6 +9,11 @@ one: "1 min" other: "{{ .Count }} min" +- id: words + translation: + one : "woord" + other: "{{ .Count }} woorden" + - id: toc translation: "Inhoudsopgave" diff --git a/i18n/pt.yaml b/i18n/pt.yaml index b30e429..f449de9 100644 --- a/i18n/pt.yaml +++ b/i18n/pt.yaml @@ -9,6 +9,11 @@ one: "1 minuto" other: "{{ .Count }} minutos" +- id: words + translation: + one : "palavra" + other: "{{ .Count }} palavras" + - id: toc translation: "Conteúdo" 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!" diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index f6dee2d..48b84d2 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -1,14 +1,19 @@ - id: prev_page - translation: "上一篇" + translation: "上一頁" - id: next_page - translation: "下一篇" + translation: "下一頁" - id: read_time translation: one : "1 分鐘" other: "{{ .Count }} 分鐘" +- id: words + translation: + one: "字" + other: "{{ .Count }} 字" + - id: toc translation: "目錄" @@ -18,6 +23,9 @@ - id: home translation: "首頁" +- id: edit_post + translation: "編輯" + - id: code_copy translation: "複製" diff --git a/i18n/zh.yaml b/i18n/zh.yaml index 006528b..0280425 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: "目录" @@ -18,6 +23,9 @@ - id: home translation: "主页" +- id: edit_post + translation: "编辑" + - id: code_copy translation: "复制" 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..01ba752 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,13 +1,25 @@ {{- define "main" }} -{{- if (and .Site.Params.profileMode.enabled .IsHome) }} +{{- if (and site.Params.profileMode.enabled .IsHome) }} {{- partial "index_profile.html" . }} {{- else }} {{/* if not profileMode */}} {{- if not .IsHome | and .Title }} - {{- $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" . }} @@ -36,17 +36,16 @@ {{- end }}
- {{- if .Params.tags }} + {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }} - {{- end }} {{- 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") -}}