Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archetypes/default.md22
-rw-r--r--assets/css/_partial/_footer.scss4
-rw-r--r--assets/css/_partial/_single/_code.scss8
-rw-r--r--assets/css/_variables.scss2
-rw-r--r--assets/js/theme.min.js4
-rw-r--r--assets/js/theme.min.js.map2
-rw-r--r--assets/svg/version.template.svg2
-rw-r--r--exampleSite/config.toml592
-rw-r--r--exampleSite/content/about.en.md3
-rw-r--r--exampleSite/content/about.fr.md3
-rw-r--r--exampleSite/content/about.zh-cn.md3
-rw-r--r--exampleSite/content/posts/basic-markdown-syntax.en.md21
-rw-r--r--exampleSite/content/posts/basic-markdown-syntax.fr.md21
-rw-r--r--exampleSite/content/posts/basic-markdown-syntax.zh-cn.md21
-rw-r--r--exampleSite/content/posts/emoji-support.en.md21
-rw-r--r--exampleSite/content/posts/emoji-support.fr.md17
-rw-r--r--exampleSite/content/posts/emoji-support.zh-cn.md21
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.en.md384
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.fr.md384
-rw-r--r--exampleSite/content/posts/theme-documentation-basics.zh-cn.md367
-rw-r--r--exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md39
-rw-r--r--exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md39
-rw-r--r--exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md39
-rw-r--r--exampleSite/content/posts/theme-documentation-content.en.md95
-rw-r--r--exampleSite/content/posts/theme-documentation-content.fr.md95
-rw-r--r--exampleSite/content/posts/theme-documentation-content.zh-cn.md90
-rw-r--r--exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md38
-rw-r--r--exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md38
-rw-r--r--exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md26
-rw-r--r--i18n/en.toml11
-rw-r--r--i18n/fr.toml11
-rw-r--r--i18n/pl.toml11
-rw-r--r--i18n/zh-CN.toml11
-rw-r--r--layouts/_default/baseof.html34
-rw-r--r--layouts/_default/section.html5
-rw-r--r--layouts/_default/single.html7
-rw-r--r--layouts/_default/summary.html19
-rw-r--r--layouts/index.html18
-rw-r--r--layouts/index.json15
-rw-r--r--layouts/partials/assets.html231
-rw-r--r--layouts/partials/comment.html96
-rw-r--r--layouts/partials/footer.html77
-rw-r--r--layouts/partials/function/content.html14
-rw-r--r--layouts/partials/function/id.html2
-rw-r--r--layouts/partials/head/link.html11
-rw-r--r--layouts/partials/head/seo.html16
-rw-r--r--layouts/partials/header.html4
-rw-r--r--layouts/partials/home/profile.html8
-rw-r--r--layouts/partials/plugin/icon.html4
-rw-r--r--layouts/partials/plugin/share.html68
-rw-r--r--layouts/partials/scratch/script.html4
-rw-r--r--layouts/partials/scratch/stylesheet.html4
-rw-r--r--layouts/partials/single/footer.html11
-rw-r--r--layouts/posts/single.html32
-rw-r--r--layouts/shortcodes/echarts.html6
-rw-r--r--layouts/shortcodes/mapbox.html18
-rw-r--r--layouts/shortcodes/mermaid.html6
-rw-r--r--layouts/shortcodes/music.html4
-rw-r--r--layouts/shortcodes/typeit.html10
-rw-r--r--layouts/taxonomy/list.html7
-rw-r--r--resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content2
-rw-r--r--src/js/theme.js43
62 files changed, 1550 insertions, 1671 deletions
diff --git a/archetypes/default.md b/archetypes/default.md
index fc3ba0d..3fa8440 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -7,32 +7,22 @@ draft: true
author: ""
authorLink: ""
description: ""
-license: ""
tags: []
categories: []
+
hiddenFromHomePage: false
hiddenFromSearch: false
featuredImage: ""
featuredImagePreview: ""
-toc: false
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
-lightgallery: true
-linkToMarkdown: true
-share:
+toc:
enable: true
-comment: true
+math:
+ enable: false
+lightgallery: false
+license: ""
---
<!--more-->
diff --git a/assets/css/_partial/_footer.scss b/assets/css/_partial/_footer.scss
index 8e51b36..29d783c 100644
--- a/assets/css/_partial/_footer.scss
+++ b/assets/css/_partial/_footer.scss
@@ -5,10 +5,10 @@ footer {
line-height: 1.5rem;
padding-top: 2rem;
- .copyright {
+ .footer-container {
font-size: .875rem;
- .copyright-line {
+ .footer-line {
width: 100%;
.icp-br {
diff --git a/assets/css/_partial/_single/_code.scss b/assets/css/_partial/_single/_code.scss
index 079cc3d..30058dd 100644
--- a/assets/css/_partial/_single/_code.scss
+++ b/assets/css/_partial/_single/_code.scss
@@ -4,8 +4,8 @@ code {
color: $code-color;
img, .version img {
- min-height: 1.1 * $code-font-size;
- height: 1.1 * $code-font-size;
+ min-height: 1.2 * $code-font-size;
+ height: 1.2 * $code-font-size;
}
.dark & {
@@ -25,7 +25,7 @@ pre {
.copy-button {
font-size: $code-font-size;
- line-height: $code-font-size;
+ line-height: 1.4 * $code-font-size;
position: absolute;
top: 0;
right: 0;
@@ -129,7 +129,7 @@ code, pre, .highlight table, .highlight tr, .highlight td {
.highlight {
font-family: $code-font-family;
font-size: $code-font-size;
- line-height: round($code-font-size * 1.4);
+ line-height: 1.4 * $code-font-size;
/* Comment */ .c,
/* CommentHashbang */ .ch,
/* CommentMultiline */ .cm,
diff --git a/assets/css/_variables.scss b/assets/css/_variables.scss
index d1841e7..bf16cb5 100644
--- a/assets/css/_variables.scss
+++ b/assets/css/_variables.scss
@@ -127,7 +127,7 @@ $code-info-color-dark: #b1b0b0 !default;
$code-font-size: .875rem !default;
// Font family of the code
-$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace !default;
+$code-font-family: Source Code Pro, Menlo, Consolas, Monaco, monospace, $global-font-family !default;
// Code type map
$code-type-map: (
diff --git a/assets/js/theme.min.js b/assets/js/theme.min.js
index d2a446c..40ee2a8 100644
--- a/assets/js/theme.min.js
+++ b/assets/js/theme.min.js
@@ -1,4 +1,4 @@
-"use strict";function _objectDestructuringEmpty(a){if(null==a)throw new TypeError("Cannot destructure undefined")}function _createForOfIteratorHelper(a){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=_unsupportedIterableToArray(a))){var b=0,c=function(){};return{s:c,n:function n(){return b>=a.length?{done:!0}:{done:!1,value:a[b++]}},e:function e(a){throw a},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d,e,f=!0,g=!1;return{s:function s(){d=a[Symbol.iterator]()},n:function n(){var a=d.next();return f=a.done,a},e:function e(a){g=!0,e=a},f:function f(){try{f||null==d.return||d.return()}finally{if(g)throw e}}}}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(c):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(a))return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}var Util=/*#__PURE__*/function(){function a(){_classCallCheck(this,a)}return _createClass(a,[{key:"forEach",value:function forEach(a,b){a=a||[];for(var c=0;c<a.length;c++)b(a[c])}},{key:"getScrollTop",value:function getScrollTop(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}},{key:"isMobile",value:function isMobile(){return window.matchMedia("only screen and (max-width: 680px)").matches}},{key:"isTocStatic",value:function isTocStatic(){return window.matchMedia("only screen and (max-width: 960px)").matches}},{key:"animateCSS",value:function animateCSS(a,b,c,d){var e;Array.isArray(b)||(b=[b]),(e=a.classList).add.apply(e,["animated"].concat(_toConsumableArray(b)));var f=function(){var c;(c=a.classList).remove.apply(c,["animated"].concat(_toConsumableArray(b))),a.removeEventListener("animationend",f),"function"==typeof d&&d()};c||a.addEventListener("animationend",f,!1)}}]),a}(),Theme=/*#__PURE__*/function(){function a(){_classCallCheck(this,a),this.config=window.config,this.contentData=this.config.content,this.isDark=document.body.classList.contains("dark"),this.util=new Util,this.newScrollTop=this.util.getScrollTop(),this.oldScrollTop=this.newScrollTop,this.scrollEventSet=new Set,this.resizeEventSet=new Set,this.switchThemeEventSet=new Set,this.clickMaskEventSet=new Set}return _createClass(a,[{key:"initMenuMobile",value:function initMenuMobile(){var a=document.getElementById("menu-toggle-mobile"),b=document.getElementById("menu-mobile");a.addEventListener("click",function(){document.body.classList.toggle("blur"),a.classList.toggle("active"),b.classList.toggle("active")},!1),this._menuMobileOnClickMask=this._menuMobileOnClickMask||function(){a.classList.remove("active"),b.classList.remove("active")},this.clickMaskEventSet.add(this._menuMobileOnClickMask)}},{key:"initSwitchTheme",value:function initSwitchTheme(){var a=this;this.util.forEach(document.getElementsByClassName("theme-switch"),function(b){b.addEventListener("click",function(){document.body.classList.toggle("dark"),a.isDark=!a.isDark,window.localStorage&&localStorage.setItem("theme",a.isDark?"dark":"light");var b,c=_createForOfIteratorHelper(a.switchThemeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}},!1)})}},{key:"initSearch",value:function initSearch(){var a=this,b=this.config.search,c=this.util.isMobile();if(!(!b||c&&this._searchMobileOnce||!c&&this._searchDesktopOnce)){var d=c?"mobile":"desktop",e=document.getElementById("header-".concat(d)),f=document.getElementById("search-input-".concat(d)),g=document.getElementById("search-toggle-".concat(d)),h=document.getElementById("search-loading-".concat(d)),i=document.getElementById("search-clear-".concat(d));c?(this._searchMobileOnce=!0,f.addEventListener("focus",function(){document.body.classList.add("blur"),e.classList.add("open")},!1),document.getElementById("search-cancel-mobile").addEventListener("click",function(){e.classList.remove("open"),document.body.classList.remove("blur"),document.getElementById("menu-toggle-mobile").classList.remove("active"),document.getElementById("menu-mobile").classList.remove("active"),h.style.display="none",i.style.display="none",a._searchMobile&&a._searchMobile.autocomplete.setVal("")},!1),i.addEventListener("click",function(){i.style.display="none",a._searchMobile&&a._searchMobile.autocomplete.setVal("")},!1),this._searchMobileOnClickMask=this._searchMobileOnClickMask||function(){e.classList.remove("open"),h.style.display="none",i.style.display="none",a._searchMobile&&a._searchMobile.autocomplete.setVal("")},this.clickMaskEventSet.add(this._searchMobileOnClickMask)):(this._searchDesktopOnce=!0,g.addEventListener("click",function(){document.body.classList.add("blur"),e.classList.add("open"),f.focus()},!1),i.addEventListener("click",function(){i.style.display="none",a._searchDesktop&&a._searchDesktop.autocomplete.setVal("")},!1),this._searchDesktopOnClickMask=this._searchDesktopOnClickMask||function(){e.classList.remove("open"),h.style.display="none",i.style.display="none",a._searchDesktop&&a._searchDesktop.autocomplete.setVal("")},this.clickMaskEventSet.add(this._searchDesktopOnClickMask)),f.addEventListener("input",function(){i.style.display=""===f.value?"none":"inline"},!1);var j=function(){var e=autocomplete("#search-input-".concat(d),{hint:!1,autoselect:!0,dropdownMenuContainer:"#search-dropdown-".concat(d),clearOnSelected:!0,cssClasses:{noPrefix:!0}// debug: true,
-},{name:"search",source:function source(c,d){h.style.display="inline",i.style.display="none";var e=function(a){h.style.display="none",i.style.display="inline",d(a)};if("lunr"===b.type){var f=function(){return lunr.queryHandler&&(c=lunr.queryHandler(c)),a._index.search(c).slice(0,12).map(function(b){var c=b.ref,d=b.matchData.metadata,e=a._indexData[c],f=e.title,g=e.content,h=0;return Object.values(d).forEach(function(a){var b=a.description,c=a.content;if(b)g=e.description,h=-1;else if(c){var d=c.position[0][0];(d<h||0===h)&&(h=d)}}),h-=40,0<h?(h+=g.substr(h,25).lastIndexOf(" ")+1,g="..."+g.substr(h,200)):g=g.substr(0,200),Object.keys(d).forEach(function(a){f=f.replace(new RegExp("(".concat(a,")"),"gi"),"<em>$1</em>"),g=g.replace(new RegExp("(".concat(a,")"),"gi"),"<em>$1</em>")}),{uri:e.uri,title:f,date:e.date,context:g}})};a._index?e(f()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("uri"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("description",{boost:10}),this.field("content",{boost:5}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.uri]=b,a.add(b)})}),a._indexData=d,e(f())}).catch(function(a){console.error(a),e([])})}else"algolia"===b.type&&(h.style.display="inline",i.style.display="none",a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:12,attributesToHighlight:["title","content"]}).then(function(a){var b=a.hits;e(b.map(function(a){var b=a.uri,c=a.date,d=a._highlightResult,e=d.title,f=d.content;return{uri:b,title:e.value,date:c,context:f.value}}))}).catch(function(a){console.error(a),e([])}))},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"<div><span class=\"suggestion-title\">".concat(b,"</span><span class=\"suggestion-date\">").concat(c,"</span></div><div class=\"suggestion-context\">").concat(d,"</div>")},empty:function empty(a){var c=a.query;return"<div class=\"search-empty\">".concat(b.noResultsFound,": <span class=\"search-query\">\"").concat(c,"\"</span></div>")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"<i class=\"fab fa-algolia fa-fw\"></i>",href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"},d=c.searchType,e=c.icon,f=c.href;return"<div class=\"search-footer\">Search by <a href=\"".concat(f,"\" rel=\"noopener noreffer\" target=\"_blank\">").concat(e," ").concat(d,"</a></div>")}}});e.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=e:a._searchDesktop=e};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var k=document.createElement("script");k.id="lunr-segmentit",k.type="text/javascript",k.src=b.lunrSegmentitURL,k.async=!0,k.readyState?k.onreadystatechange=function(){("loaded"==k.readyState||"complete"==k.readyState)&&(k.onreadystatechange=null,j())}:k.onload=function(){j()},document.body.appendChild(k)}else j()}}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code");b.length&&(a.className+=" "+b[b.length-1].className.toLowerCase(),b[0].classList.add("lnc"),b[b.length-1].classList.remove("lnc"))}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)}),this.util.forEach(document.querySelectorAll("pre > code"),function(b){if(b.classList.add("block"),!b.classList.contains("lnc")&&a.config.clipboard){var c=document.createElement("div");c.classList.add("copy-button"),c.innerHTML="<i class=\"far fa-copy fa-fw\"></i>",c.setAttribute("data-clipboard-text",b.innerText),c.title=a.config.clipboard.title;var d=new ClipboardJS(c);d.on("success",function(){a.util.animateCSS(b,"flash")}),b.after(c)}})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".page.single .content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="<a href=\"#".concat(a.id,"\" class=\"header-mark\"></a>").concat(a.innerHTML)})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px");var f=b.getElementsByTagName("a"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==this.config.desktopHeaderMode,k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTop<n?(c.style.position="absolute",c.style.top="".concat(m,"px")):a.newScrollTop>o?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;r<h.length-1;r++){var s=h[r].getBoundingClientRect().top,t=h[r+1].getBoundingClientRect().top;if(0==r&&s>p||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.contentData[b.id],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;b<a._echartsArr.length;b++)a._echartsArr[b].dispose();a._echartsArr=[],a.util.forEach(document.getElementsByClassName("echarts"),function(b){var c=echarts.init(b,a.isDark?"dark":"macarons",{renderer:"svg"});c.setOption(JSON.parse(a.contentData[b.id])),a._echartsArr.push(c)})},this.switchThemeEventSet.add(this._echartsOnSwitchTheme),this._echartsOnSwitchTheme(),this._echartsOnResize=this._echartsOnResize||function(){for(var b=0;b<a._echartsArr.length;b++)a._echartsArr[b].resize()},this.resizeEventSet.add(this._echartsOnResize)}},{key:"initMapbox",value:function initMapbox(){var a=this;this.config.mapbox&&(mapboxgl.accessToken=this.config.mapbox.accessToken,mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin),this._mapboxArr=this._mapboxArr||[],this.util.forEach(document.getElementsByClassName("mapbox"),function(b){var c=a.contentData[b.id],d=c.lng,e=c.lat,f=c.zoom,g=c.lightStyle,h=c.darkStyle,i=c.marked,j=c.navigation,k=c.geolocate,l=c.scale,m=c.fullscreen,n=new mapboxgl.Map({container:b,center:[d,e],zoom:f,minZoom:.2,style:a.isDark?h:g,attributionControl:!1});i&&new mapboxgl.Marker().setLngLat([d,e]).addTo(n),j&&n.addControl(new mapboxgl.NavigationControl,"bottom-right"),k&&n.addControl(new mapboxgl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},showUserLocation:!0,trackUserLocation:!0}),"bottom-right"),l&&n.addControl(new mapboxgl.ScaleControl),m&&n.addControl(new mapboxgl.FullscreenControl),n.addControl(new MapboxLanguage),a._mapboxArr.push(n)}),this._mapboxOnSwitchTheme=this._mapboxOnSwitchTheme||function(){a.util.forEach(a._mapboxArr,function(b){var c=b.getContainer(),d=a.contentData[c.id],e=d.lightStyle,f=d.darkStyle;b.setStyle(a.isDark?f:e),b.addControl(new MapboxLanguage)})},this.switchThemeEventSet.add(this._mapboxOnSwitchTheme))}},{key:"initTypeit",value:function initTypeit(){var a=this;if(this.config.typeit)for(var b=this.config.typeit,c=function(c){var d=b[c];(function(b){var c=d[b];if(b===d.length-1)return void new TypeIt("#".concat(c),{strings:a.contentData[c]}).go();var e=new TypeIt("#".concat(c),{strings:a.contentData[c],afterComplete:function afterComplete(){e.destroy(),typeone(b+1)}}).go()})(0)},d=0;d<b.length;d++)c(d)}},{key:"initComment",value:function initComment(){if(this.config.comment&&this.config.comment.gitalk){this.config.comment.gitalk.body=decodeURI(window.location.href);var a=new Gitalk(this.config.comment.gitalk.body);a.render("gitalk")}this.config.comment&&this.config.comment.valine&&new Valine(this.config.comment.valine)}},{key:"initSmoothScroll",value:function initSmoothScroll(){!this.util.isMobile()&&"normal"===this.config.desktopHeaderMode||this.util.isMobile()&&"normal"===this.config.mobileHeaderMode?new SmoothScroll("[href^=\"#\"]",{speed:300,speedAsDuration:!0}):new SmoothScroll("[href^=\"#\"]",{speed:300,speedAsDuration:!0,header:"#header-desktop"})}},{key:"onScroll",value:function onScroll(){var a=this,b=[];if("auto"===this.config.desktopHeaderMode&&b.push(document.getElementById("header-desktop")),"auto"===this.config.mobileHeaderMode&&b.push(document.getElementById("header-mobile")),document.getElementById("comments")){var e=document.getElementById("view-comments");e.href="#comments",e.style.display="block"}var c=document.getElementById("fixed-buttons"),d=20;window.addEventListener("scroll",function(){a.newScrollTop=a.util.getScrollTop();var e=a.newScrollTop-a.oldScrollTop;a.util.forEach(b,function(b){e>d?(b.classList.remove("fadeInDown"),a.util.animateCSS(b,["fadeOutUp","faster"],!0)):e<-d&&(b.classList.remove("fadeOutUp"),a.util.animateCSS(b,["fadeInDown","faster"],!0))}),a.newScrollTop>d?e>d?(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","faster"],!0)):e<-d&&(c.style.display="block",c.classList.remove("fadeOut"),a.util.animateCSS(c,["fadeIn","faster"],!0)):c.style.display="none";var f,g=_createForOfIteratorHelper(a.scrollEventSet);try{for(g.s();!(f=g.n()).done;){var h=f.value;h()}}catch(a){g.e(a)}finally{g.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initSmoothScroll(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initSearch(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initMapbox(),this.initTypeit(),this.initToc(),this.initComment(),this.initSmoothScroll(),this.onScroll(),this.onResize(),this.onClickMask()}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit();
+"use strict";function _objectDestructuringEmpty(a){if(null==a)throw new TypeError("Cannot destructure undefined")}function _createForOfIteratorHelper(a){if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=_unsupportedIterableToArray(a))){var b=0,c=function(){};return{s:c,n:function n(){return b>=a.length?{done:!0}:{done:!1,value:a[b++]}},e:function e(a){throw a},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d,e,f=!0,g=!1;return{s:function s(){d=a[Symbol.iterator]()},n:function n(){var a=d.next();return f=a.done,a},e:function e(a){g=!0,e=a},f:function f(){try{f||null==d.return||d.return()}finally{if(g)throw e}}}}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(c):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _iterableToArray(a){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(a))return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray(a)}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}var Util=/*#__PURE__*/function(){function a(){_classCallCheck(this,a)}return _createClass(a,[{key:"forEach",value:function forEach(a,b){a=a||[];for(var c=0;c<a.length;c++)b(a[c])}},{key:"getScrollTop",value:function getScrollTop(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}},{key:"isMobile",value:function isMobile(){return window.matchMedia("only screen and (max-width: 680px)").matches}},{key:"isTocStatic",value:function isTocStatic(){return window.matchMedia("only screen and (max-width: 960px)").matches}},{key:"animateCSS",value:function animateCSS(a,b,c,d){var e;Array.isArray(b)||(b=[b]),(e=a.classList).add.apply(e,["animated"].concat(_toConsumableArray(b)));var f=function(){var c;(c=a.classList).remove.apply(c,["animated"].concat(_toConsumableArray(b))),a.removeEventListener("animationend",f),"function"==typeof d&&d()};c||a.addEventListener("animationend",f,!1)}}]),a}(),Theme=/*#__PURE__*/function(){function a(){_classCallCheck(this,a),this.config=window.config,this.data=this.config.data,this.isDark=document.body.classList.contains("dark"),this.util=new Util,this.newScrollTop=this.util.getScrollTop(),this.oldScrollTop=this.newScrollTop,this.scrollEventSet=new Set,this.resizeEventSet=new Set,this.switchThemeEventSet=new Set,this.clickMaskEventSet=new Set}return _createClass(a,[{key:"initMenuMobile",value:function initMenuMobile(){var a=document.getElementById("menu-toggle-mobile"),b=document.getElementById("menu-mobile");a.addEventListener("click",function(){document.body.classList.toggle("blur"),a.classList.toggle("active"),b.classList.toggle("active")},!1),this._menuMobileOnClickMask=this._menuMobileOnClickMask||function(){a.classList.remove("active"),b.classList.remove("active")},this.clickMaskEventSet.add(this._menuMobileOnClickMask)}},{key:"initSwitchTheme",value:function initSwitchTheme(){var a=this;this.util.forEach(document.getElementsByClassName("theme-switch"),function(b){b.addEventListener("click",function(){document.body.classList.toggle("dark"),a.isDark=!a.isDark,window.localStorage&&localStorage.setItem("theme",a.isDark?"dark":"light");var b,c=_createForOfIteratorHelper(a.switchThemeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}},!1)})}},{key:"initSearch",value:function initSearch(){var a=this,b=this.config.search,c=this.util.isMobile();if(!(!b||c&&this._searchMobileOnce||!c&&this._searchDesktopOnce)){var d=c?"mobile":"desktop",e=document.getElementById("header-".concat(d)),f=document.getElementById("search-input-".concat(d)),g=document.getElementById("search-toggle-".concat(d)),h=document.getElementById("search-loading-".concat(d)),i=document.getElementById("search-clear-".concat(d));c?(this._searchMobileOnce=!0,f.addEventListener("focus",function(){document.body.classList.add("blur"),e.classList.add("open")},!1),document.getElementById("search-cancel-mobile").addEventListener("click",function(){e.classList.remove("open"),document.body.classList.remove("blur"),document.getElementById("menu-toggle-mobile").classList.remove("active"),document.getElementById("menu-mobile").classList.remove("active"),h.style.display="none",i.style.display="none",a._searchMobile&&a._searchMobile.autocomplete.setVal("")},!1),i.addEventListener("click",function(){i.style.display="none",a._searchMobile&&a._searchMobile.autocomplete.setVal("")},!1),this._searchMobileOnClickMask=this._searchMobileOnClickMask||function(){e.classList.remove("open"),h.style.display="none",i.style.display="none",a._searchMobile&&a._searchMobile.autocomplete.setVal("")},this.clickMaskEventSet.add(this._searchMobileOnClickMask)):(this._searchDesktopOnce=!0,g.addEventListener("click",function(){document.body.classList.add("blur"),e.classList.add("open"),f.focus()},!1),i.addEventListener("click",function(){i.style.display="none",a._searchDesktop&&a._searchDesktop.autocomplete.setVal("")},!1),this._searchDesktopOnClickMask=this._searchDesktopOnClickMask||function(){e.classList.remove("open"),h.style.display="none",i.style.display="none",a._searchDesktop&&a._searchDesktop.autocomplete.setVal("")},this.clickMaskEventSet.add(this._searchDesktopOnClickMask)),f.addEventListener("input",function(){i.style.display=""===f.value?"none":"inline"},!1);var j=function(){var e=autocomplete("#search-input-".concat(d),{hint:!1,autoselect:!0,dropdownMenuContainer:"#search-dropdown-".concat(d),clearOnSelected:!0,cssClasses:{noPrefix:!0}// debug: true,
+},{name:"search",source:function source(c,d){h.style.display="inline",i.style.display="none";var e=function(a){h.style.display="none",i.style.display="inline",d(a)};if("lunr"===b.type){var f=function(){return lunr.queryHandler&&(c=lunr.queryHandler(c)),a._index.search(c).slice(0,12).map(function(b){var c=b.ref,d=b.matchData.metadata,e=a._indexData[c],f=e.title,g=e.content,h=0;return Object.values(d).forEach(function(a){var b=a.description,c=a.content;if(b)g=e.description,h=-1;else if(c){var d=c.position[0][0];(d<h||0===h)&&(h=d)}}),h-=40,0<h?(h+=g.substr(h,25).lastIndexOf(" ")+1,g="..."+g.substr(h,200)):g=g.substr(0,200),Object.keys(d).forEach(function(a){f=f.replace(new RegExp("(".concat(a,")"),"gi"),"<em>$1</em>"),g=g.replace(new RegExp("(".concat(a,")"),"gi"),"<em>$1</em>")}),{uri:e.uri,title:f,date:e.date,context:g}})};a._index?e(f()):fetch(b.lunrIndexURL).then(function(a){return a.json()}).then(function(c){var d={};a._index=lunr(function(){var a=this;b.lunrLanguageCode&&this.use(lunr[b.lunrLanguageCode]),this.ref("uri"),this.field("title",{boost:50}),this.field("tags",{boost:20}),this.field("description",{boost:10}),this.field("content",{boost:5}),this.metadataWhitelist=["position"],c.forEach(function(b){d[b.uri]=b,a.add(b)})}),a._indexData=d,e(f())}).catch(function(a){console.error(a),e([])})}else"algolia"===b.type&&(h.style.display="inline",i.style.display="none",a._algoliaIndex=a._algoliaIndex||algoliasearch(b.algoliaAppID,b.algoliaSearchKey).initIndex(b.algoliaIndex),a._algoliaIndex.search(c,{offset:0,length:12,attributesToHighlight:["title","content"]}).then(function(a){var b=a.hits;e(b.map(function(a){var b=a.uri,c=a.date,d=a._highlightResult,e=d.title,f=d.content;return{uri:b,title:e.value,date:c,context:f.value}}))}).catch(function(a){console.error(a),e([])}))},templates:{suggestion:function suggestion(a){var b=a.title,c=a.date,d=a.context;return"<div><span class=\"suggestion-title\">".concat(b,"</span><span class=\"suggestion-date\">").concat(c,"</span></div><div class=\"suggestion-context\">").concat(d,"</div>")},empty:function empty(a){var c=a.query;return"<div class=\"search-empty\">".concat(b.noResultsFound,": <span class=\"search-query\">\"").concat(c,"\"</span></div>")},footer:function footer(a){_objectDestructuringEmpty(a);var c="algolia"===b.type?{searchType:"algolia",icon:"<i class=\"fab fa-algolia fa-fw\"></i>",href:"https://www.algolia.com/"}:{searchType:"Lunr.js",icon:"",href:"https://lunrjs.com/"},d=c.searchType,e=c.icon,f=c.href;return"<div class=\"search-footer\">Search by <a href=\"".concat(f,"\" rel=\"noopener noreffer\" target=\"_blank\">").concat(e," ").concat(d,"</a></div>")}}});e.on("autocomplete:selected",function(a,b){window.location.assign(b.uri)}),c?a._searchMobile=e:a._searchDesktop=e};if(b.lunrSegmentitURL&&!document.getElementById("lunr-segmentit")){var k=document.createElement("script");k.id="lunr-segmentit",k.type="text/javascript",k.src=b.lunrSegmentitURL,k.async=!0,k.readyState?k.onreadystatechange=function(){("loaded"==k.readyState||"complete"==k.readyState)&&(k.onreadystatechange=null,j())}:k.onload=function(){j()},document.body.appendChild(k)}else j()}}},{key:"initLightGallery",value:function initLightGallery(){this.config.lightGallery&&lightGallery(document.getElementById("content"),this.config.lightGallery)}},{key:"initHighlight",value:function initHighlight(){var a=this;this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code");b.length&&(a.className+=" "+b[b.length-1].className.toLowerCase(),b[0].classList.add("lnc"),b[b.length-1].classList.remove("lnc"))}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)}),this.util.forEach(document.querySelectorAll("pre > code"),function(b){if(b.classList.add("block"),!b.classList.contains("lnc")&&a.config.clipboard){var c=document.createElement("div");c.classList.add("copy-button"),c.innerHTML="<i class=\"far fa-copy fa-fw\"></i>",c.setAttribute("data-clipboard-text",b.innerText),c.title=a.config.clipboard.title;var d=new ClipboardJS(c);d.on("success",function(){a.util.animateCSS(b,"flash")}),b.after(c)}})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".page.single .content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="<a href=\"#".concat(a.id,"\" class=\"header-mark\"></a>").concat(a.innerHTML)})}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("TableOfContents");if(null!==b)if(this.util.isTocStatic()){var o=document.getElementById("toc-content-static");b.parentElement!==o&&(b.parentElement.removeChild(b),o.appendChild(b)),this._tocOnScroll&&this.scrollEventSet.delete(this._tocOnScroll)}else{var p=document.getElementById("toc-content-auto");b.parentElement!==p&&(b.parentElement.removeChild(b),p.appendChild(b));var c=document.getElementById("toc-auto"),d=document.getElementsByClassName("page")[0],e=d.getBoundingClientRect();c.style.left="".concat(e.left+e.width+20,"px"),c.style.maxWidth="".concat(d.getBoundingClientRect().left-20,"px");var f=b.getElementsByTagName("a"),g=b.getElementsByTagName("li"),h=document.getElementsByClassName("headerLink"),j="normal"!==this.config.headerMode.desktop,k=document.getElementById("header-desktop").offsetHeight,l=20+(j?k:0),m=c.offsetTop,n=m-l+(j?0:k);this._tocOnScroll=this._tocOnScroll||function(){var d=document.getElementById("post-footer").offsetTop,e=d-c.getBoundingClientRect().height,o=e-l+(j?0:k);a.newScrollTop<n?(c.style.position="absolute",c.style.top="".concat(m,"px")):a.newScrollTop>o?(c.style.position="absolute",c.style.top="".concat(e,"px")):(c.style.position="fixed",c.style.top="".concat(l,"px")),a.util.forEach(f,function(a){a.classList.remove("active")}),a.util.forEach(g,function(a){a.classList.remove("has-active")});for(var p=20+(j?k:0),q=h.length-1,r=0;r<h.length-1;r++){var s=h[r].getBoundingClientRect().top,t=h[r+1].getBoundingClientRect().top;if(0==r&&s>p||s<=p&&t>p){q=r;break}}if(-1!==q){f[q].classList.add("active");for(var u=f[q].parentElement;u!==b;)u.classList.add("has-active"),u=u.parentElement.parentElement}},this._tocOnScroll(),this.scrollEventSet.add(this._tocOnScroll)}}},{key:"initMath",value:function initMath(){this.config.math&&renderMathInElement(document.body,this.config.math)}},{key:"initMermaid",value:function initMermaid(){var a=this,b=document.getElementsByClassName("mermaid");b.length&&(mermaid.initialize({startOnLoad:!1,theme:"null"}),this.util.forEach(b,function(b){mermaid.mermaidAPI.render("svg-"+b.id,a.data[b.id],function(a){b.innerHTML=a},b)}))}},{key:"initEcharts",value:function initEcharts(){var a=this;this._echartsOnSwitchTheme=this._echartsOnSwitchTheme||function(){a._echartsArr=a._echartsArr||[];for(var b=0;b<a._echartsArr.length;b++)a._echartsArr[b].dispose();a._echartsArr=[],a.util.forEach(document.getElementsByClassName("echarts"),function(b){var c=echarts.init(b,a.isDark?"dark":"macarons",{renderer:"svg"});c.setOption(JSON.parse(a.data[b.id])),a._echartsArr.push(c)})},this.switchThemeEventSet.add(this._echartsOnSwitchTheme),this._echartsOnSwitchTheme(),this._echartsOnResize=this._echartsOnResize||function(){for(var b=0;b<a._echartsArr.length;b++)a._echartsArr[b].resize()},this.resizeEventSet.add(this._echartsOnResize)}},{key:"initMapbox",value:function initMapbox(){var a=this;this.config.mapbox&&(mapboxgl.accessToken=this.config.mapbox.accessToken,mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin),this._mapboxArr=this._mapboxArr||[],this.util.forEach(document.getElementsByClassName("mapbox"),function(b){var c=a.data[b.id],d=c.lng,e=c.lat,f=c.zoom,g=c.lightStyle,h=c.darkStyle,i=c.marked,j=c.navigation,k=c.geolocate,l=c.scale,m=c.fullscreen,n=new mapboxgl.Map({container:b,center:[d,e],zoom:f,minZoom:.2,style:a.isDark?h:g,attributionControl:!1});i&&new mapboxgl.Marker().setLngLat([d,e]).addTo(n),j&&n.addControl(new mapboxgl.NavigationControl,"bottom-right"),k&&n.addControl(new mapboxgl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},showUserLocation:!0,trackUserLocation:!0}),"bottom-right"),l&&n.addControl(new mapboxgl.ScaleControl),m&&n.addControl(new mapboxgl.FullscreenControl),n.addControl(new MapboxLanguage),a._mapboxArr.push(n)}),this._mapboxOnSwitchTheme=this._mapboxOnSwitchTheme||function(){a.util.forEach(a._mapboxArr,function(b){var c=b.getContainer(),d=a.data[c.id],e=d.lightStyle,f=d.darkStyle;b.setStyle(a.isDark?f:e),b.addControl(new MapboxLanguage)})},this.switchThemeEventSet.add(this._mapboxOnSwitchTheme))}},{key:"initTypeit",value:function initTypeit(){var a=this;this.config.typeit&&this.config.typeit.forEach(function(b){var c=function(d){var e=b[d];if(d===b.length-1)return void new TypeIt("#".concat(e),{strings:a.data[e]}).go();var f=new TypeIt("#".concat(e),{strings:a.data[e],afterComplete:function afterComplete(){f.destroy(),c(d+1)}}).go()};c(0)})}},{key:"initComment",value:function initComment(){if(this.config.comment&&this.config.comment.gitalk){this.config.comment.gitalk.body=decodeURI(window.location.href);var a=new Gitalk(this.config.comment.gitalk.body);a.render("gitalk")}this.config.comment&&this.config.comment.valine&&new Valine(this.config.comment.valine)}},{key:"initSmoothScroll",value:function initSmoothScroll(){!this.util.isMobile()&&"normal"===this.config.headerMode.desktop||this.util.isMobile()&&"normal"===this.config.headerMode.mobile?new SmoothScroll("[href^=\"#\"]",{speed:300,speedAsDuration:!0}):new SmoothScroll("[href^=\"#\"]",{speed:300,speedAsDuration:!0,header:"#header-desktop"})}},{key:"onScroll",value:function onScroll(){var a=this,b=[];if("auto"===this.config.headerMode.desktop&&b.push(document.getElementById("header-desktop")),"auto"===this.config.headerMode.mobile&&b.push(document.getElementById("header-mobile")),document.getElementById("comments")){var e=document.getElementById("view-comments");e.href="#comments",e.style.display="block"}var c=document.getElementById("fixed-buttons"),d=20;window.addEventListener("scroll",function(){a.newScrollTop=a.util.getScrollTop();var e=a.newScrollTop-a.oldScrollTop;a.util.forEach(b,function(b){e>d?(b.classList.remove("fadeInDown"),a.util.animateCSS(b,["fadeOutUp","faster"],!0)):e<-d&&(b.classList.remove("fadeOutUp"),a.util.animateCSS(b,["fadeInDown","faster"],!0))}),a.newScrollTop>d?e>d?(c.classList.remove("fadeIn"),a.util.animateCSS(c,["fadeOut","faster"],!0)):e<-d&&(c.style.display="block",c.classList.remove("fadeOut"),a.util.animateCSS(c,["fadeIn","faster"],!0)):c.style.display="none";var f,g=_createForOfIteratorHelper(a.scrollEventSet);try{for(g.s();!(f=g.n()).done;){var h=f.value;h()}}catch(a){g.e(a)}finally{g.f()}a.oldScrollTop=a.newScrollTop},!1)}},{key:"onResize",value:function onResize(){var a=this;window.addEventListener("resize",function(){a._resizeTimeout||(a._resizeTimeout=window.setTimeout(function(){a._resizeTimeout=null;var b,c=_createForOfIteratorHelper(a.resizeEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}a.initToc(),a.initSmoothScroll(),a.initMermaid(),a.initSearch()},100))},!1)}},{key:"onClickMask",value:function onClickMask(){var a=this;document.getElementById("mask").addEventListener("click",function(){var b,c=_createForOfIteratorHelper(a.clickMaskEventSet);try{for(c.s();!(b=c.n()).done;){var d=b.value;d()}}catch(a){c.e(a)}finally{c.f()}document.body.classList.remove("blur")},!1)}},{key:"init",value:function init(){this.initMenuMobile(),this.initSwitchTheme(),this.initSearch(),this.initLightGallery(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initToc(),this.initComment(),this.initSmoothScroll(),this.initMath(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initMapbox(),this.onScroll(),this.onResize(),this.onClickMask()}}]),a}(),themeInit=function(){var a=new Theme;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",themeInit,!1):themeInit();
//# sourceMappingURL=theme.min.js.map \ No newline at end of file
diff --git a/assets/js/theme.min.js.map b/assets/js/theme.min.js.map
index e1afb77..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,CAMH,KAAK,SAAL,EANG,CAOH,KAAK,cAAL,EAPG,CAQH,KAAK,QAAL,EARG,CASH,KAAK,WAAL,EATG,CAUH,KAAK,WAAL,EAVG,CAWH,KAAK,UAAL,EAXG,CAYH,KAAK,UAAL,EAZG,CAaH,KAAK,OAAL,EAbG,CAcH,KAAK,WAAL,EAdG,CAeH,KAAK,gBAAL,EAfG,CAiBH,KAAK,QAAL,EAjBG,CAkBH,KAAK,QAAL,EAlBG,CAmBH,KAAK,WAAL,EACH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n animateCSS(element, animation, reserved, callback) {\n if (!Array.isArray(animation)) animation = [animation];\n element.classList.add('animated', ...animation);\n const handler = () => {\n element.classList.remove('animated', ...animation);\n element.removeEventListener('animationend', handler);\n if (typeof callback === 'function') callback();\n };\n if (!reserved) element.addEventListener('animationend', handler, false);\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.contentData = this.config.content;\n this.isDark = document.body.classList.contains('dark');\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n document.body.classList.toggle('dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n const classSuffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${classSuffix}`);\n const $searchInput = document.getElementById(`search-input-${classSuffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${classSuffix}`);\n const $searchLoading = document.getElementById(`search-loading-${classSuffix}`);\n const $searchClear = document.getElementById(`search-clear-${classSuffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const CONTEXT_LENGTH = 200;\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${classSuffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${classSuffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n // debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n return this._index.search(query).slice(0, 12).map(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { title, content: context } = matchData;\n let position = 0;\n Object.values(metadata).forEach(({ description, content }) => {\n if (description) {\n context = matchData.description;\n position = -1;\n } else if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= CONTEXT_LENGTH / 5;\n if (position > 0) {\n position += context.substr(position, 25).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, CONTEXT_LENGTH);\n } else {\n context = context.substr(0, CONTEXT_LENGTH);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), '<em>$1</em>');\n context = context.replace(new RegExp(`(${key})`, 'gi'), '<em>$1</em>');\n });\n return {\n 'uri': matchData.uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('uri');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('description', { boost: 10 });\n this.field('content', { boost: 5 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.uri] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, { offset: 0, length: 12, attributesToHighlight: ['title', 'content'] })\n .then(({ hits }) => {\n finish(hits.map(({ uri, date, _highlightResult: { title, content } }) => ({\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n })));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `<div><span class=\"suggestion-title\">${title}</span><span class=\"suggestion-date\">${date}</span></div><div class=\"suggestion-context\">${context}</div>`,\n empty: ({ query }) => `<div class=\"search-empty\">${searchConfig.noResultsFound}: <span class=\"search-query\">\"${query}\"</span></div>`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '<i class=\"fab fa-algolia fa-fw\"></i>',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return `<div class=\"search-footer\">Search by <a href=\"${href}\" rel=\"noopener noreffer\" target=\"_blank\">${icon} ${searchType}</a></div>`;},\n },\n });\n autosearch.on('autocomplete:selected', (event, suggestion, dataset, context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $elements = $chroma.querySelectorAll('pre.chroma > code');\n if ($elements.length) {\n $chroma.className += ' ' + $elements[$elements.length - 1].className.toLowerCase();\n $elements[0].classList.add('lnc');\n $elements[$elements.length - 1].classList.remove('lnc');\n }\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('pre > code'), $code => {\n $code.classList.add('block');\n if ($code.classList.contains('lnc') || !this.config.clipboard) return;\n const $button = document.createElement('div');\n $button.classList.add('copy-button');\n $button.innerHTML = '<i class=\"far fa-copy fa-fw\"></i>';\n $button.setAttribute('data-clipboard-text', $code.innerText);\n $button.title = this.config.clipboard.title;\n const clipboard = new ClipboardJS($button);\n clipboard.on('success', e => {\n this.util.animateCSS($code, 'flash');\n });\n $code.after($button);\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), $header => {\n $header.classList.add('headerLink');\n $header.innerHTML = `<a href=\"#${$header.id}\" class=\"header-mark\"></a>${$header.innerHTML}`;\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null) return;\n if (this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n const $tocLinkElements = $tocCore.getElementsByTagName('a');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('headerLink');\n const headerIsFixed = this.config.desktopHeaderMode !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.contentData[$mermaid.id], svgCode => {\n $mermaid.innerHTML = svgCode;\n }, $mermaid);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.contentData[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.contentData[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.contentData[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n const typeitData = this.config.typeit;\n for (let i = 0; i < typeitData.length; i++) {\n const group = typeitData[i];\n ((i) => {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: this.contentData[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: this.contentData[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n })(0);\n }\n }\n }\n\n initComment() {\n if (this.config.comment && this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk.body);\n gitalk.render('gitalk');\n }\n if (this.config.comment && this.config.comment.valine) new Valine(this.config.comment.valine);\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && this.config.desktopHeaderMode === 'normal')\n || (this.util.isMobile() && this.config.mobileHeaderMode === 'normal')) {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true});\n } else {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});\n }\n }\n\n onScroll() {\n const $headers = [];\n if (this.config.desktopHeaderMode === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (this.config.mobileHeaderMode === 'auto') $headers.push(document.getElementById('header-mobile'));\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const MIN_SCROLL = 20;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n this.util.forEach($headers, $header => {\n if (scroll > MIN_SCROLL) {\n $header.classList.remove('fadeInDown');\n this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $header.classList.remove('fadeOutUp');\n this.util.animateCSS($header, ['fadeInDown', 'faster'], true);\n }\n });\n if (this.newScrollTop > MIN_SCROLL) {\n if (scroll > MIN_SCROLL) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);\n }\n } else {\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initMapbox();\n this.initTypeit();\n this.initToc();\n this.initComment();\n this.initSmoothScroll();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file
+{"version":3,"sources":["../../src/js/theme.js"],"names":[],"mappings":"ilEAAM,CAAA,I,2HACM,C,CAAU,C,CAAS,CACvB,CAAQ,CAAG,CAAQ,EAAI,EADA,CAEvB,IAAK,GAAI,CAAA,CAAC,CAAG,CAAb,CAAgB,CAAC,CAAG,CAAQ,CAAC,MAA7B,CAAqC,CAAC,EAAtC,CAA0C,CAAO,CAAC,CAAQ,CAAC,CAAD,CAAT,CACpD,C,mDAEc,CACX,MAAQ,CAAA,QAAQ,CAAC,eAAT,EAA4B,QAAQ,CAAC,eAAT,CAAyB,SAAtD,EAAoE,QAAQ,CAAC,IAAT,CAAc,SAC5F,C,2CAEU,CACP,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,iDAEa,CACV,MAAO,CAAA,MAAM,CAAC,UAAP,CAAkB,oCAAlB,EAAwD,OAClE,C,8CAEU,C,CAAS,C,CAAW,C,CAAU,C,CAAU,OAC1C,KAAK,CAAC,OAAN,CAAc,CAAd,CAD0C,GAChB,CAAS,CAAG,CAAC,CAAD,CADI,EAE/C,GAAA,CAAO,CAAC,SAAR,EAAkB,GAAlB,UAAsB,UAAtB,4BAAqC,CAArC,GAF+C,CAG/C,GAAM,CAAA,CAAO,CAAG,UAAM,OAClB,GAAA,CAAO,CAAC,SAAR,EAAkB,MAAlB,UAAyB,UAAzB,4BAAwC,CAAxC,GADkB,CAElB,CAAO,CAAC,mBAAR,CAA4B,cAA5B,CAA4C,CAA5C,CAFkB,CAGM,UAApB,QAAO,CAAA,CAHO,EAGkB,CAAQ,EAC/C,CAJD,CAKK,CAR0C,EAQhC,CAAO,CAAC,gBAAR,CAAyB,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H,KAAK,UAAL,EAHG,CAIH,KAAK,gBAAL,EAJG,CAKH,KAAK,aAAL,EALG,CAMH,KAAK,SAAL,EANG,CAOH,KAAK,cAAL,EAPG,CAQH,KAAK,OAAL,EARG,CASH,KAAK,WAAL,EATG,CAUH,KAAK,gBAAL,EAVG,CAWH,KAAK,QAAL,EAXG,CAYH,KAAK,WAAL,EAZG,CAaH,KAAK,WAAL,EAbG,CAcH,KAAK,UAAL,EAdG,CAeH,KAAK,UAAL,EAfG,CAiBH,KAAK,QAAL,EAjBG,CAkBH,KAAK,QAAL,EAlBG,CAmBH,KAAK,WAAL,EACH,C,SAGC,SAAS,CAAG,UAAM,CACpB,GAAM,CAAA,CAAK,CAAG,GAAI,CAAA,KAAlB,CACA,CAAK,CAAC,IAAN,EACH,C,CAE2B,SAAxB,GAAA,QAAQ,CAAC,U,CAGT,QAAQ,CAAC,gBAAT,CAA0B,kBAA1B,CAA8C,SAA9C,I,CAFA,SAAS,E","file":"theme.min.js","sourcesContent":["class Util {\n forEach(elements, handler) {\n elements = elements || [];\n for (let i = 0; i < elements.length; i++) handler(elements[i]);\n }\n\n getScrollTop() {\n return (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;\n }\n\n isMobile() {\n return window.matchMedia('only screen and (max-width: 680px)').matches;\n }\n\n isTocStatic() {\n return window.matchMedia('only screen and (max-width: 960px)').matches;\n }\n\n animateCSS(element, animation, reserved, callback) {\n if (!Array.isArray(animation)) animation = [animation];\n element.classList.add('animated', ...animation);\n const handler = () => {\n element.classList.remove('animated', ...animation);\n element.removeEventListener('animationend', handler);\n if (typeof callback === 'function') callback();\n };\n if (!reserved) element.addEventListener('animationend', handler, false);\n }\n}\n\nclass Theme {\n constructor() {\n this.config = window.config;\n this.data = this.config.data;\n this.isDark = document.body.classList.contains('dark');\n this.util = new Util();\n this.newScrollTop = this.util.getScrollTop();\n this.oldScrollTop = this.newScrollTop;\n this.scrollEventSet = new Set();\n this.resizeEventSet = new Set();\n this.switchThemeEventSet = new Set();\n this.clickMaskEventSet = new Set();\n }\n\n initMenuMobile() {\n const $menuToggleMobile = document.getElementById('menu-toggle-mobile');\n const $menuMobile = document.getElementById('menu-mobile');\n $menuToggleMobile.addEventListener('click', () => {\n document.body.classList.toggle('blur');\n $menuToggleMobile.classList.toggle('active');\n $menuMobile.classList.toggle('active');\n }, false);\n this._menuMobileOnClickMask = this._menuMobileOnClickMask || (() => {\n $menuToggleMobile.classList.remove('active');\n $menuMobile.classList.remove('active');\n });\n this.clickMaskEventSet.add(this._menuMobileOnClickMask);\n }\n\n initSwitchTheme() {\n this.util.forEach(document.getElementsByClassName('theme-switch'), $themeSwitch => {\n $themeSwitch.addEventListener('click', () => {\n document.body.classList.toggle('dark');\n this.isDark = !this.isDark;\n window.localStorage && localStorage.setItem('theme', this.isDark ? 'dark' : 'light');\n for (let event of this.switchThemeEventSet) event();\n }, false);\n });\n }\n\n initSearch() {\n const searchConfig = this.config.search;\n const isMobile = this.util.isMobile();\n if (!searchConfig || isMobile && this._searchMobileOnce || !isMobile && this._searchDesktopOnce) return;\n const classSuffix = isMobile ? 'mobile' : 'desktop';\n const $header = document.getElementById(`header-${classSuffix}`);\n const $searchInput = document.getElementById(`search-input-${classSuffix}`);\n const $searchToggle = document.getElementById(`search-toggle-${classSuffix}`);\n const $searchLoading = document.getElementById(`search-loading-${classSuffix}`);\n const $searchClear = document.getElementById(`search-clear-${classSuffix}`);\n if (isMobile) {\n this._searchMobileOnce = true;\n $searchInput.addEventListener('focus', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n }, false);\n document.getElementById('search-cancel-mobile').addEventListener('click', () => {\n $header.classList.remove('open');\n document.body.classList.remove('blur');\n document.getElementById('menu-toggle-mobile').classList.remove('active');\n document.getElementById('menu-mobile').classList.remove('active');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n }, false);\n this._searchMobileOnClickMask = this._searchMobileOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchMobile && this._searchMobile.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchMobileOnClickMask);\n } else {\n this._searchDesktopOnce = true;\n $searchToggle.addEventListener('click', () => {\n document.body.classList.add('blur');\n $header.classList.add('open');\n $searchInput.focus();\n }, false);\n $searchClear.addEventListener('click', () => {\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n }, false);\n this._searchDesktopOnClickMask = this._searchDesktopOnClickMask || (() => {\n $header.classList.remove('open');\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'none';\n this._searchDesktop && this._searchDesktop.autocomplete.setVal('');\n });\n this.clickMaskEventSet.add(this._searchDesktopOnClickMask);\n }\n $searchInput.addEventListener('input', () => {\n if ($searchInput.value === '') $searchClear.style.display = 'none';\n else $searchClear.style.display = 'inline';\n }, false);\n\n const CONTEXT_LENGTH = 200;\n const initAutosearch = () => {\n const autosearch = autocomplete(`#search-input-${classSuffix}`, {\n hint: false,\n autoselect: true,\n dropdownMenuContainer: `#search-dropdown-${classSuffix}`,\n clearOnSelected: true,\n cssClasses: { noPrefix: true },\n // debug: true,\n }, {\n name: 'search',\n source: (query, callback) => {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n const finish = (results) => {\n $searchLoading.style.display = 'none';\n $searchClear.style.display = 'inline';\n callback(results);\n };\n if (searchConfig.type === 'lunr') {\n const search = () => {\n if (lunr.queryHandler) query = lunr.queryHandler(query);\n return this._index.search(query).slice(0, 12).map(({ ref, matchData: { metadata } }) => {\n const matchData = this._indexData[ref];\n let { title, content: context } = matchData;\n let position = 0;\n Object.values(metadata).forEach(({ description, content }) => {\n if (description) {\n context = matchData.description;\n position = -1;\n } else if (content) {\n const matchPosition = content.position[0][0];\n if (matchPosition < position || position === 0) position = matchPosition;\n }\n });\n position -= CONTEXT_LENGTH / 5;\n if (position > 0) {\n position += context.substr(position, 25).lastIndexOf(' ') + 1;\n context = '...' + context.substr(position, CONTEXT_LENGTH);\n } else {\n context = context.substr(0, CONTEXT_LENGTH);\n }\n Object.keys(metadata).forEach(key => {\n title = title.replace(new RegExp(`(${key})`, 'gi'), '<em>$1</em>');\n context = context.replace(new RegExp(`(${key})`, 'gi'), '<em>$1</em>');\n });\n return {\n 'uri': matchData.uri,\n 'title' : title,\n 'date' : matchData.date,\n 'context' : context,\n };\n });\n }\n if (!this._index) {\n fetch(searchConfig.lunrIndexURL)\n .then(response => response.json())\n .then(data => {\n const indexData = {};\n this._index = lunr(function () {\n if (searchConfig.lunrLanguageCode) this.use(lunr[searchConfig.lunrLanguageCode]);\n this.ref('uri');\n this.field('title', { boost: 50 });\n this.field('tags', { boost: 20 });\n this.field('description', { boost: 10 });\n this.field('content', { boost: 5 });\n this.metadataWhitelist = ['position'];\n data.forEach((record) => {\n indexData[record.uri] = record;\n this.add(record);\n });\n });\n this._indexData = indexData;\n finish(search());\n }).catch(err => {\n console.error(err);\n finish([]);\n });\n } else finish(search());\n } else if (searchConfig.type === 'algolia') {\n $searchLoading.style.display = 'inline';\n $searchClear.style.display = 'none';\n this._algoliaIndex = this._algoliaIndex || algoliasearch(searchConfig.algoliaAppID, searchConfig.algoliaSearchKey).initIndex(searchConfig.algoliaIndex);\n this._algoliaIndex\n .search(query, { offset: 0, length: 12, attributesToHighlight: ['title', 'content'] })\n .then(({ hits }) => {\n finish(hits.map(({ uri, date, _highlightResult: { title, content } }) => ({\n uri: uri,\n title: title.value,\n date: date,\n context: content.value,\n })));\n })\n .catch(err => {\n console.error(err);\n finish([]);\n });\n }\n },\n templates: {\n suggestion: ({ title, date, context }) => `<div><span class=\"suggestion-title\">${title}</span><span class=\"suggestion-date\">${date}</span></div><div class=\"suggestion-context\">${context}</div>`,\n empty: ({ query }) => `<div class=\"search-empty\">${searchConfig.noResultsFound}: <span class=\"search-query\">\"${query}\"</span></div>`,\n footer: ({}) => {\n const { searchType, icon, href } = searchConfig.type === 'algolia' ? {\n searchType: 'algolia',\n icon: '<i class=\"fab fa-algolia fa-fw\"></i>',\n href: 'https://www.algolia.com/',\n } : {\n searchType: 'Lunr.js',\n icon: '',\n href: 'https://lunrjs.com/',\n };\n return `<div class=\"search-footer\">Search by <a href=\"${href}\" rel=\"noopener noreffer\" target=\"_blank\">${icon} ${searchType}</a></div>`;},\n },\n });\n autosearch.on('autocomplete:selected', (event, suggestion, dataset, context) => {\n window.location.assign(suggestion.uri);\n });\n if (isMobile) this._searchMobile = autosearch;\n else this._searchDesktop = autosearch;\n };\n if (searchConfig.lunrSegmentitURL && !document.getElementById('lunr-segmentit')) {\n const script = document.createElement('script');\n script.id = 'lunr-segmentit';\n script.type = 'text/javascript';\n script.src = searchConfig.lunrSegmentitURL;\n script.async = true;\n if (script.readyState) {\n script.onreadystatechange = () => {\n if (script.readyState == 'loaded' || script.readyState == 'complete'){\n script.onreadystatechange = null;\n initAutosearch();\n }\n };\n } else {\n script.onload = () => {\n initAutosearch();\n };\n }\n document.body.appendChild(script);\n } else initAutosearch();\n }\n\n initLightGallery() {\n if (this.config.lightGallery) lightGallery(document.getElementById('content'), this.config.lightGallery);\n }\n\n initHighlight() {\n this.util.forEach(document.querySelectorAll('.highlight > .chroma'), $chroma => {\n const $elements = $chroma.querySelectorAll('pre.chroma > code');\n if ($elements.length) {\n $chroma.className += ' ' + $elements[$elements.length - 1].className.toLowerCase();\n $elements[0].classList.add('lnc');\n $elements[$elements.length - 1].classList.remove('lnc');\n }\n });\n this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), $preChroma => {\n const $chroma = document.createElement('div');\n $chroma.className = $preChroma.className;\n const $table = document.createElement('table');\n $chroma.appendChild($table);\n const $tbody = document.createElement('tbody');\n $table.appendChild($tbody);\n const $tr = document.createElement('tr');\n $tbody.appendChild($tr);\n const $td = document.createElement('td');\n $tr.appendChild($td);\n $preChroma.parentElement.replaceChild($chroma, $preChroma);\n $td.appendChild($preChroma);\n });\n this.util.forEach(document.querySelectorAll('pre > code'), $code => {\n $code.classList.add('block');\n if ($code.classList.contains('lnc') || !this.config.clipboard) return;\n const $button = document.createElement('div');\n $button.classList.add('copy-button');\n $button.innerHTML = '<i class=\"far fa-copy fa-fw\"></i>';\n $button.setAttribute('data-clipboard-text', $code.innerText);\n $button.title = this.config.clipboard.title;\n const clipboard = new ClipboardJS($button);\n clipboard.on('success', e => {\n this.util.animateCSS($code, 'flash');\n });\n $code.after($button);\n });\n }\n\n initTable() {\n this.util.forEach(document.querySelectorAll('.content table'), $table => {\n const $wrapper = document.createElement('div');\n $wrapper.className = 'table-wrapper';\n $table.parentElement.replaceChild($wrapper, $table);\n $wrapper.appendChild($table);\n });\n }\n\n initHeaderLink() {\n for (let num = 1; num <= 6; num++) {\n this.util.forEach(document.querySelectorAll('.page.single .content > h' + num), $header => {\n $header.classList.add('headerLink');\n $header.innerHTML = `<a href=\"#${$header.id}\" class=\"header-mark\"></a>${$header.innerHTML}`;\n });\n }\n }\n\n initToc() {\n const $tocCore = document.getElementById('TableOfContents');\n if ($tocCore === null) return;\n if (this.util.isTocStatic()) {\n const $tocContentStatic = document.getElementById('toc-content-static');\n if ($tocCore.parentElement !== $tocContentStatic) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentStatic.appendChild($tocCore);\n }\n if (this._tocOnScroll) this.scrollEventSet.delete(this._tocOnScroll);\n } else {\n const $tocContentAuto = document.getElementById('toc-content-auto');\n if ($tocCore.parentElement !== $tocContentAuto) {\n $tocCore.parentElement.removeChild($tocCore);\n $tocContentAuto.appendChild($tocCore);\n }\n const $toc = document.getElementById('toc-auto');\n const $page = document.getElementsByClassName('page')[0];\n const rect = $page.getBoundingClientRect();\n $toc.style.left = `${rect.left + rect.width + 20}px`;\n $toc.style.maxWidth = `${$page.getBoundingClientRect().left - 20}px`;\n const $tocLinkElements = $tocCore.getElementsByTagName('a');\n const $tocLiElements = $tocCore.getElementsByTagName('li');\n const $headerLinkElements = document.getElementsByClassName('headerLink');\n const headerIsFixed = this.config.headerMode.desktop !== 'normal';\n const headerHeight = document.getElementById('header-desktop').offsetHeight;\n const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n const minTocTop = $toc.offsetTop;\n const minScrollTop = minTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n this._tocOnScroll = this._tocOnScroll || (() => {\n const footerTop = document.getElementById('post-footer').offsetTop;\n const maxTocTop = footerTop - $toc.getBoundingClientRect().height;\n const maxScrollTop = maxTocTop - TOP_SPACING + (headerIsFixed ? 0 : headerHeight);\n if (this.newScrollTop < minScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${minTocTop}px`;\n } else if (this.newScrollTop > maxScrollTop) {\n $toc.style.position = 'absolute';\n $toc.style.top = `${maxTocTop}px`;\n } else {\n $toc.style.position = 'fixed';\n $toc.style.top = `${TOP_SPACING}px`;\n }\n\n this.util.forEach($tocLinkElements, $tocLink => { $tocLink.classList.remove('active'); });\n this.util.forEach($tocLiElements, $tocLi => { $tocLi.classList.remove('has-active'); });\n const INDEX_SPACING = 20 + (headerIsFixed ? headerHeight : 0);\n let activeTocIndex = $headerLinkElements.length - 1;\n for (let i = 0; i < $headerLinkElements.length - 1; i++) {\n const thisTop = $headerLinkElements[i].getBoundingClientRect().top;\n const nextTop = $headerLinkElements[i + 1].getBoundingClientRect().top;\n if ((i == 0 && thisTop > INDEX_SPACING)\n || (thisTop <= INDEX_SPACING && nextTop > INDEX_SPACING)) {\n activeTocIndex = i;\n break;\n }\n }\n if (activeTocIndex !== -1) {\n $tocLinkElements[activeTocIndex].classList.add('active');\n let $parent = $tocLinkElements[activeTocIndex].parentElement;\n while ($parent !== $tocCore) {\n $parent.classList.add('has-active');\n $parent = $parent.parentElement.parentElement;\n }\n }\n });\n this._tocOnScroll();\n this.scrollEventSet.add(this._tocOnScroll);\n }\n }\n\n initMath() {\n if (this.config.math) renderMathInElement(document.body, this.config.math);\n }\n\n initMermaid() {\n const $mermaidElements = document.getElementsByClassName('mermaid');\n if ($mermaidElements.length) {\n mermaid.initialize({startOnLoad: false, theme: 'null'});\n this.util.forEach($mermaidElements, $mermaid => {\n mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {\n $mermaid.innerHTML = svgCode;\n }, $mermaid);\n });\n }\n }\n\n initEcharts() {\n this._echartsOnSwitchTheme = this._echartsOnSwitchTheme || (() => {\n this._echartsArr = this._echartsArr || [];\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].dispose();\n }\n this._echartsArr = [];\n this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {\n const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});\n chart.setOption(JSON.parse(this.data[$echarts.id]));\n this._echartsArr.push(chart);\n });\n });\n this.switchThemeEventSet.add(this._echartsOnSwitchTheme);\n this._echartsOnSwitchTheme();\n this._echartsOnResize = this._echartsOnResize || (() => {\n for (let i = 0; i < this._echartsArr.length; i++) {\n this._echartsArr[i].resize();\n }\n });\n this.resizeEventSet.add(this._echartsOnResize);\n }\n\n initMapbox() {\n if (this.config.mapbox) {\n mapboxgl.accessToken = this.config.mapbox.accessToken;\n mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);\n this._mapboxArr = this._mapboxArr || [];\n this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {\n const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];\n const mapbox = new mapboxgl.Map({\n container: $mapbox,\n center: [lng, lat],\n zoom: zoom,\n minZoom: .2,\n style: this.isDark ? darkStyle : lightStyle,\n attributionControl: false,\n });\n if (marked) {\n new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapbox);\n }\n if (navigation) {\n mapbox.addControl(new mapboxgl.NavigationControl(), 'bottom-right');\n }\n if (geolocate) {\n mapbox.addControl(new mapboxgl.GeolocateControl({\n positionOptions: {\n enableHighAccuracy: true,\n },\n showUserLocation: true,\n trackUserLocation: true,\n }), 'bottom-right');\n }\n if (scale) {\n mapbox.addControl(new mapboxgl.ScaleControl());\n }\n if (fullscreen) {\n mapbox.addControl(new mapboxgl.FullscreenControl());\n }\n mapbox.addControl(new MapboxLanguage());\n this._mapboxArr.push(mapbox);\n });\n this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {\n this.util.forEach(this._mapboxArr, mapbox => {\n const $mapbox = mapbox.getContainer();\n const { lightStyle, darkStyle } = this.data[$mapbox.id];\n mapbox.setStyle(this.isDark ? darkStyle : lightStyle);\n mapbox.addControl(new MapboxLanguage());\n });\n });\n this.switchThemeEventSet.add(this._mapboxOnSwitchTheme);\n }\n }\n\n initTypeit() {\n if (this.config.typeit) {\n this.config.typeit.forEach(group => {\n const typeone = (i) => {\n const id = group[i];\n if (i === group.length - 1) {\n new TypeIt(`#${id}`, {\n strings: this.data[id],\n }).go();\n return;\n }\n let instance = new TypeIt(`#${id}`, {\n strings: this.data[id],\n afterComplete: () => {\n instance.destroy();\n typeone(i + 1);\n },\n }).go();\n };\n typeone(0);\n });\n }\n }\n\n initComment() {\n if (this.config.comment && this.config.comment.gitalk) {\n this.config.comment.gitalk.body = decodeURI(window.location.href);\n const gitalk = new Gitalk(this.config.comment.gitalk.body);\n gitalk.render('gitalk');\n }\n if (this.config.comment && this.config.comment.valine) new Valine(this.config.comment.valine);\n }\n\n initSmoothScroll() {\n if ((!this.util.isMobile() && this.config.headerMode.desktop === 'normal')\n || (this.util.isMobile() && this.config.headerMode.mobile === 'normal')) {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true});\n } else {\n new SmoothScroll('[href^=\"#\"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});\n }\n }\n\n onScroll() {\n const $headers = [];\n if (this.config.headerMode.desktop === 'auto') $headers.push(document.getElementById('header-desktop'));\n if (this.config.headerMode.mobile === 'auto') $headers.push(document.getElementById('header-mobile'));\n if (document.getElementById('comments')) {\n const $viewComments = document.getElementById('view-comments');\n $viewComments.href = `#comments`;\n $viewComments.style.display = 'block';\n }\n const $fixedButtons = document.getElementById('fixed-buttons');\n const MIN_SCROLL = 20;\n window.addEventListener('scroll', () => {\n this.newScrollTop = this.util.getScrollTop();\n const scroll = this.newScrollTop - this.oldScrollTop;\n this.util.forEach($headers, $header => {\n if (scroll > MIN_SCROLL) {\n $header.classList.remove('fadeInDown');\n this.util.animateCSS($header, ['fadeOutUp', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $header.classList.remove('fadeOutUp');\n this.util.animateCSS($header, ['fadeInDown', 'faster'], true);\n }\n });\n if (this.newScrollTop > MIN_SCROLL) {\n if (scroll > MIN_SCROLL) {\n $fixedButtons.classList.remove('fadeIn');\n this.util.animateCSS($fixedButtons, ['fadeOut', 'faster'], true);\n } else if (scroll < - MIN_SCROLL) {\n $fixedButtons.style.display = 'block';\n $fixedButtons.classList.remove('fadeOut');\n this.util.animateCSS($fixedButtons, ['fadeIn', 'faster'], true);\n }\n } else {\n $fixedButtons.style.display = 'none';\n }\n for (let event of this.scrollEventSet) event();\n this.oldScrollTop = this.newScrollTop;\n }, false);\n }\n\n onResize() {\n window.addEventListener('resize', () => {\n if (!this._resizeTimeout) {\n this._resizeTimeout = window.setTimeout(() => {\n this._resizeTimeout = null;\n for (let event of this.resizeEventSet) event();\n this.initToc();\n this.initSmoothScroll();\n this.initMermaid();\n this.initSearch();\n }, 100);\n }\n }, false);\n }\n\n onClickMask() {\n document.getElementById('mask').addEventListener('click', () => {\n for (let event of this.clickMaskEventSet) event();\n document.body.classList.remove('blur');\n }, false);\n }\n\n init() {\n this.initMenuMobile();\n this.initSwitchTheme();\n this.initSearch();\n this.initLightGallery();\n this.initHighlight();\n this.initTable();\n this.initHeaderLink();\n this.initToc();\n this.initComment();\n this.initSmoothScroll();\n this.initMath();\n this.initMermaid();\n this.initEcharts();\n this.initTypeit();\n this.initMapbox();\n\n this.onScroll();\n this.onResize();\n this.onClickMask();\n }\n}\n\nconst themeInit = () => {\n const theme = new Theme();\n theme.init();\n};\n\nif (document.readyState !== 'loading') {\n themeInit();\n} else {\n document.addEventListener('DOMContentLoaded', themeInit, false);\n}\n"]} \ No newline at end of file
diff --git a/assets/svg/version.template.svg b/assets/svg/version.template.svg
index ffcbeab..32ce06d 100644
--- a/assets/svg/version.template.svg
+++ b/assets/svg/version.template.svg
@@ -1,5 +1,5 @@
{{- /* https://img.shields.io/badge/$label-$version-$color?style=flat-square&labelColor=403c3d */ -}}
-{{- $labelLength := strings.RuneCount .label | mul 60 | add 120 -}}
+{{- $labelLength := strings.RuneCount .label | mul 64 | add 100 -}}
{{- $versionLength := strings.RuneCount .version | mul 60 -}}
<svg xmlns="http://www.w3.org/2000/svg" width="{{ add $labelLength $versionLength | add 200 | mul 0.1 }}" height="20">
<g shape-rendering="crispEdges">
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 959ddae..f5163d6 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -38,9 +38,7 @@ enableEmoji = true
googleAnalytics = ""
# copyright description used only for seo schema
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
- # date format
- dateFormatToUse = "2006-01-02"
- # Menu Info
+ # Menu config
[languages.en.menu]
[[languages.en.menu.main]]
identifier = "posts"
@@ -91,22 +89,22 @@ enableEmoji = true
description = "About LoveIt Theme"
# site keywords
keywords = ["Theme", "Hugo"]
- # site default theme ("light", "dark", "auto")
- defaultTheme = "auto"
- # Search
+ # Search config
[languages.en.params.search]
enable = true
# type of search engine ("lunr", "algolia")
type = "algolia"
# index length of the content
contentLength = 5000
+ # placeholder of the search bar
+ placeholder = ""
[languages.en.params.search.algolia]
index = "index.en"
appID = "PASDMWALPK"
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
- # Home Page Info
+ # Home page config
[languages.en.params.home]
- # Home Page Profile
+ # Home page profile
[languages.en.params.home.profile]
enable = true
# Gravatar Email for preferred avatar in home page
@@ -121,14 +119,12 @@ enableEmoji = true
social = true
# disclaimer (HTML format is supported)
disclaimer = ""
- # Home Page Posts
+ # Home page posts
[languages.en.params.home.posts]
enable = true
# special amount of posts in each home posts page
paginate = 6
- # default behavior when you don't set "hiddenFromHomePage" in front matter
- defaultHiddenFromHomePage = false
- # Social Info in home page
+ # Social config in home page
[languages.en.params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
@@ -194,82 +190,6 @@ enableEmoji = true
# XMPP = "xxxx"
# Matrix = "xxxx"
# Bilibili = "xxxx"
- # Social Share Links in post page
- [languages.en.params.share]
- enable = true
- Twitter = true
- Facebook = true
- Linkedin = true
- Whatsapp = true
- Pinterest = true
- # Tumblr = true
- HackerNews = true
- # Reddit = true
- # VK = true
- # Buffer = true
- # Xing = true
- # Line = true
- # Instapaper = true
- # Pocket = true
- # Digg = true
- # Stumbleupon = true
- # Flipboard = true
- # Weibo = true
- # Renren = true
- # Myspace = true
- # Blogger = true
- # Baidu = true
- # Odnoklassniki = true
- # Evernote = true
- # Skype = true
- # Trello = true
- # Mix = true
- # Comment Config
- [languages.en.params.comment]
- enable = true
- # Disqus Comment Config (https://disqus.com/)
- [languages.en.params.comment.disqus]
- enable = false
- # Disqus shortname to use Disqus in posts
- shortname = ""
- # Gitalk Comment Config (https://github.com/gitalk/gitalk)
- [languages.en.params.comment.gitalk]
- enable = false
- owner = ""
- repo = ""
- clientId = ""
- clientSecret = ""
- # Valine Comment Config (https://github.com/xCss/Valine)
- [languages.en.params.comment.valine]
- enable = true
- appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
- appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
- placeholder = "Your comment ..."
- notify = false
- verify = true
- avatar = "mp"
- meta= ""
- pageSize = 10
- lang = "en"
- visitor = true
- recordIP = true
- # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
- [languages.en.params.comment.facebook]
- enable = false
- width = "100%"
- numPosts = 10
- appId = ""
- languageCode = "en_US"
- # Telegram Comments Config (https://comments.app/)
- [languages.en.params.comment.telegram]
- enable = false
- siteID = ""
- limit = 5
- height = ""
- color = ""
- colorful = true
- dislikes = false
- outlined = false
[languages.zh-cn]
weight = 2
@@ -285,9 +205,7 @@ enableEmoji = true
googleAnalytics = ""
# 版æƒæ述,仅仅用于 SEO
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
- # 日期格å¼
- dateFormatToUse = "2006-01-02"
- # èœå•ä¿¡æ¯
+ # èœå•é…ç½®
[languages.zh-cn.menu]
[[languages.zh-cn.menu.main]]
identifier = "posts"
@@ -336,15 +254,15 @@ enableEmoji = true
description = "关于 LoveIt 主题"
# 网站关键è¯
keywords = ["Theme", "Hugo"]
- # 网站默认主题 ("light", "dark", "auto")
- defaultTheme = "auto"
- # æœç´¢
+ # æœç´¢é…ç½®
[languages.zh-cn.params.search]
enable = true
# æœç´¢å¼•æ“Žçš„类型 ("lunr", "algolia")
type = "algolia"
# 文章内容索引长度
contentLength = 5000
+ # æœç´¢æ¡†çš„å ä½æ示语
+ placeholder = ""
[languages.zh-cn.params.search.algolia]
index = "index.zh-cn"
appID = "PASDMWALPK"
@@ -371,8 +289,6 @@ enableEmoji = true
enable = true
# 主页æ¯é¡µæ˜¾ç¤ºæ–‡ç« æ•°é‡
paginate = 6
- # 当你没有在文章å‰é¢è®¾ç½® "hiddenFromHomePage" 时的默认行为
- defaultHiddenFromHomePage = false
# 主页的社交信æ¯è®¾ç½®
[languages.zh-cn.params.social]
GitHub = "xxxx"
@@ -439,82 +355,6 @@ enableEmoji = true
# XMPP = "xxxx@example.com"
# Matrix = "xxxx"
Bilibili = "xxxx"
- # 文章页é¢çš„分享信æ¯è®¾ç½®
- [languages.zh-cn.params.share]
- enable = true
- Twitter = true
- Facebook = true
- # Linkedin = true
- # Whatsapp = true
- # Pinterest = true
- # Tumblr = true
- # HackerNews = true
- # Reddit = true
- # VK = true
- # Buffer = true
- # Xing = true
- # Line = true
- # Instapaper = true
- # Pocket = true
- # Digg = true
- # Stumbleupon = true
- # Flipboard = true
- Weibo = true
- Renren = true
- # Myspace = true
- # Blogger = true
- Baidu = true
- # Odnoklassniki = true
- Evernote = true
- # Skype = true
- # Trello = true
- # Mix = true
- # 评论系统设置
- [languages.zh-cn.params.comment]
- enable = true
- # Disqus 评论系统设置 (https://disqus.com/)
- [languages.zh-cn.params.comment.disqus]
- enable = false
- # Disqus çš„ shortname,用æ¥åœ¨æ–‡ç« ä¸­å¯ç”¨ Disqus 评论系统
- shortname = ""
- # Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
- [languages.zh-cn.params.comment.gitalk]
- enable = false
- owner = ""
- repo = ""
- clientId = ""
- clientSecret = ""
- # Valine 评论系统设置 (https://github.com/xCss/Valine)
- [languages.zh-cn.params.comment.valine]
- enable = true
- appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
- appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
- placeholder = "你的评论 ..."
- notify = false
- verify = true
- avatar = "mp"
- meta= ""
- pageSize = 10
- lang = "zh-cn"
- visitor = true
- recordIP = true
- # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
- [languages.zh-cn.params.comment.facebook]
- enable = false
- width = "100%"
- numPosts = 10
- appId = ""
- languageCode = "zh_CN"
- # Telegram Comments 评论系统设置 (https://comments.app/)
- [languages.zh-cn.params.comment.telegram]
- enable = false
- siteID = ""
- limit = 5
- height = ""
- color = ""
- colorful = true
- dislikes = false
- outlined = false
[languages.fr]
weight = 3
@@ -530,9 +370,7 @@ enableEmoji = true
googleAnalytics = ""
# copyright description used only for seo schema
copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License."
- # date format
- dateFormatToUse = "2006-01-02"
- # Menu Info
+ # Menu config
[languages.fr.menu]
[[languages.fr.menu.main]]
identifier = "posts"
@@ -581,22 +419,22 @@ enableEmoji = true
description = "À propos du thème LoveIt"
# site keywords
keywords = ["Thème", "Hugo"]
- # site default theme ("light", "dark", "auto")
- defaultTheme = "auto"
- # Search
+ # Search config
[languages.fr.params.search]
enable = true
# type of search engine ("lunr", "algolia")
type = "algolia"
# index length of the content
contentLength = 5000
+ # placeholder of the search bar
+ placeholder = ""
[languages.fr.params.search.algolia]
index = "index.fr"
appID = "PASDMWALPK"
searchKey = "b42948e51daaa93df92381c8e2ac0f93"
- # Home Page Info
+ # Home page config
[languages.fr.params.home]
- # Home Page Profile
+ # Home page profile
[languages.fr.params.home.profile]
enable = true
# Gravatar Email for preferred avatar in home page
@@ -611,14 +449,12 @@ enableEmoji = true
social = true
# disclaimer (HTML format is supported)
disclaimer = ""
- # Home Page Posts
+ # Home page posts
[languages.fr.params.home.posts]
enable = true
# special amount of posts in each home posts page
paginate = 6
- # default behavior when you don't set "hiddenFromHomePage" in front matter
- defaultHiddenFromHomePage = false
- # Social Info in home page
+ # Social config in home page
[languages.fr.params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
@@ -684,95 +520,25 @@ enableEmoji = true
# XMPP = "xxxx"
# Matrix = "xxxx"
# Bilibili = "xxxx"
- # Social Share Links in post page
- [languages.fr.params.share]
- enable = true
- Twitter = true
- Facebook = true
- Linkedin = true
- Whatsapp = true
- Pinterest = true
- # Tumblr = true
- HackerNews = true
- # Reddit = true
- # VK = true
- # Buffer = true
- # Xing = true
- # Line = true
- # Instapaper = true
- # Pocket = true
- # Digg = true
- # Stumbleupon = true
- # Flipboard = true
- # Weibo = true
- # Renren = true
- # Myspace = true
- # Blogger = true
- # Baidu = true
- # Odnoklassniki = true
- # Evernote = true
- # Skype = true
- # Trello = true
- # Mix = true
- # Comment Config
- [languages.fr.params.comment]
- enable = true
- # Disqus Comment Config (https://disqus.com/)
- [languages.fr.params.comment.disqus]
- enable = false
- # Disqus shortname to use Disqus in posts
- shortname = ""
- # Gitalk Comment Config (https://github.com/gitalk/gitalk)
- [languages.fr.params.comment.gitalk]
- enable = false
- owner = ""
- repo = ""
- clientId = ""
- clientSecret = ""
- # Valine Comment Config (https://github.com/xCss/Valine)
- [languages.fr.params.comment.valine]
- enable = true
- appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
- appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
- placeholder = "Votre commentaire ..."
- notify = false
- verify = true
- avatar = "mp"
- meta= ""
- pageSize = 10
- lang = "en"
- visitor = true
- recordIP = true
- # Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
- [languages.fr.params.comment.facebook]
- enable = false
- width = "100%"
- numPosts = 10
- appId = ""
- languageCode = "fr"
- # Telegram Comments Config (https://comments.app/)
- [languages.fr.params.comment.telegram]
- enable = false
- siteID = ""
- limit = 5
- height = ""
- color = ""
- colorful = true
- dislikes = false
- outlined = false
[params]
# LoveIt theme version
# LoveIt 主题版本
version = "0.2.X"
+ # site default theme ("light", "dark", "auto")
+ # 网站默认主题 ("light", "dark", "auto")
+ defaultTheme = "auto"
# public git repo url only then enableGitInfo is true
# 公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
gitRepo = "https://github.com/dillonzq/LoveIt"
# which hash function used for SRI, when empty, no SRI is used ("sha256", "sha384", "sha512", "md5")
# 哪ç§å“ˆå¸Œå‡½æ•°ç”¨æ¥ SRI, 为空时表示ä¸ä½¿ç”¨ SRI ("sha256", "sha384", "sha512", "md5")
fingerprint = ""
- # Header info
- # 页é¢å¤´éƒ¨å¯¼èˆªæ ä¿¡æ¯
+ # date format
+ # 日期格å¼
+ dateFormat = "2006-01-02"
+ # Header config
+ # 页é¢å¤´éƒ¨å¯¼èˆªæ é…ç½®
[params.header]
# desktop header mode ("fixed", "normal", "auto")
# æ¡Œé¢ç«¯å¯¼èˆªæ æ¨¡å¼ ("fixed", "normal", "auto")
@@ -780,10 +546,23 @@ enableEmoji = true
# mobile header mode ("fixed", "normal", "auto")
# 移动端导航æ æ¨¡å¼ ("fixed", "normal", "auto")
mobileMode = "auto"
- # Footer Copyright Info
- # 页é¢åº•éƒ¨ç‰ˆæƒä¿¡æ¯è®¾ç½®
+ # Footer config
+ # 页é¢åº•éƒ¨ä¿¡æ¯é…ç½®
[params.footer]
- # Site creation time
+ enable = true
+ # Custom content (HTML format is supported)
+ # 自定义内容 (æ”¯æŒ HTML æ ¼å¼)
+ custom = ''
+ # whether to show Hugo and theme info
+ # 是å¦æ˜¾ç¤º Hugo 和主题信æ¯
+ hugo = true
+ # whether to show copyright info
+ # 是å¦æ˜¾ç¤ºç‰ˆæƒä¿¡æ¯
+ copyright = true
+ # whether to show the author
+ # 是å¦æ˜¾ç¤ºä½œè€…
+ author = true
+ # site creation time
# 网站创立年份
since = 2019
# ICP info only in China (HTML format is supported)
@@ -792,57 +571,209 @@ enableEmoji = true
# license info (HTML format is supported)
# 许å¯åè®®ä¿¡æ¯ (æ”¯æŒ HTML æ ¼å¼)
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
+ # Section (all posts) page config
+ # Section (所有文章) 页é¢é…ç½®
+ [params.section]
+ # special amount of posts in each section page
+ # section 页é¢æ¯é¡µæ˜¾ç¤ºæ–‡ç« æ•°é‡
+ paginate = 20
+ # date format (month and day)
+ # æ—¥æœŸæ ¼å¼ (月和日)
+ dateFormat = "01-02"
+ # List (category or tag) page config
+ # List (目录或标签) 页é¢é…ç½®
+ [params.list]
+ # special amount of posts in each list page
+ # list 页é¢æ¯é¡µæ˜¾ç¤ºæ–‡ç« æ•°é‡
+ paginate = 20
+ # date format (month and day)
+ # æ—¥æœŸæ ¼å¼ (月和日)
+ dateFormat = "01-02"
# Page config
# 文章页é¢é…ç½®
[params.page]
- # whether to use lightgallery in the page
- # 是å¦åœ¨æ–‡ç« é¡µé¢ä½¿ç”¨ lightgallery
- lightgallery = true
- # whether to show link to Raw Markdown content of the post
- # 是å¦åœ¨æ–‡ç« é¡µé¢æ˜¾ç¤ºåŽŸå§‹ Markdown 文档链接
+ # whether to hide a page from home page
+ # 是å¦åœ¨ä¸»é¡µéšè—一篇文章
+ hiddenFromHomePage = false
+ # whether to hide a page from search results
+ # 是å¦åœ¨æœç´¢ç»“果中éšè—一篇文章
+ hiddenFromSearch = false
+ # whether to enable lightgallery
+ # 是å¦ä½¿ç”¨ lightgallery
+ lightgallery = false
+ # whether to show the copy button of the code block
+ # 是å¦æ˜¾ç¤ºä»£ç å—çš„å¤åˆ¶æŒ‰é’®
+ copyCode = true
+ # whether to enable the ruby extended syntax
+ # 是å¦ä½¿ç”¨ ruby 扩展语法
+ ruby = true
+ # whether to enable the fraction extended syntax
+ # 是å¦ä½¿ç”¨ fraction 扩展语法
+ fraction = true
+ # whether to enable the fontawesome extended syntax
+ # 是å¦ä½¿ç”¨ fontawesome 扩展语法
+ fontawesome = true
+ # whether to show link to Raw Markdown content of the content
+ # 是å¦æ˜¾ç¤ºåŽŸå§‹ Markdown 文档内容的链接
linkToMarkdown = true
- # KaTeX mathematical formulas config (KaTeX https://katex.org/)
- # KaTeX 数学公å¼é…ç½® (KaTeX https://katex.org/)
- [params.math]
- enable = true
- # default block delimiter is $$ ... $$ and \\[ ... \\]
- # 默认å—定界符是 $$ ... $$ å’Œ \\[ ... \\]
- blockLeftDelimiter = ""
- blockRightDelimiter = ""
- # default inline delimiter is $ ... $ and \\( ... \\)
- # 默认内è”定界符是 $ ... $ å’Œ \\( ... \\)
- inlineLeftDelimiter = ""
- inlineRightDelimiter = ""
- # KaTeX extension copy_tex
- # KaTeX æ’件 copy_tex
- copyTex = true
- # KaTeX extension mhchem
- # KaTeX æ’件 mhchem
- mhchem = true
- # Mapbox GL JS config (Mapbox GL JS https://docs.mapbox.com/mapbox-gl-js)
- # Mapbox GL JS é…ç½® (Mapbox GL JS https://docs.mapbox.com/mapbox-gl-js)
- [params.mapbox]
- # access token of Mapbox GL JS
- # Mapbox GL JS çš„ access token
- accessToken = "pk.eyJ1IjoiZGlsbG9uenEiLCJhIjoiY2s2czd2M2x3MDA0NjNmcGxmcjVrZmc2cyJ9.aSjv2BNuZUfARvxRYjSVZQ"
- # style for the light theme
- # 浅色主题的地图样å¼
- lightStyle = "mapbox://styles/mapbox/light-v9?optimize=true"
- # style for the dark theme
- # 深色主题的地图样å¼
- darkStyle = "mapbox://styles/mapbox/dark-v9?optimize=true"
- # whether to add NavigationControl (https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol)
- # 是å¦æ·»åŠ  NavigationControl (https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol)
- navigation = true
- # whether to add GeolocateControl (https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol)
- # 是å¦æ·»åŠ  GeolocateControl (https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol)
- geolocate = true
- # whether to add ScaleControl (https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol)
- # 是å¦æ·»åŠ  ScaleControl (https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol)
- scale = true
- # whether to add FullscreenControl (https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol)
- # 是å¦æ·»åŠ  FullscreenControl (https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol)
- fullscreen = true
+ # Table of the contents config
+ # 目录é…ç½®
+ [params.page.toc]
+ # whether to enable the table of the contents
+ # 是å¦ä½¿ç”¨ç›®å½•
+ enable = true
+ # whether to make the table of the contents automatically collapsed
+ # 是å¦ä½¿ç›®å½•è‡ªåŠ¨æŠ˜å å±•å¼€
+ auto = true
+ # KaTeX mathematical formulas config (KaTeX https://katex.org/)
+ # KaTeX 数学公å¼é…ç½® (KaTeX https://katex.org/)
+ [params.page.math]
+ enable = false
+ # default block delimiter is $$ ... $$ and \\[ ... \\]
+ # 默认å—定界符是 $$ ... $$ å’Œ \\[ ... \\]
+ blockLeftDelimiter = ""
+ blockRightDelimiter = ""
+ # default inline delimiter is $ ... $ and \\( ... \\)
+ # 默认内è”定界符是 $ ... $ å’Œ \\( ... \\)
+ inlineLeftDelimiter = ""
+ inlineRightDelimiter = ""
+ # KaTeX extension copy_tex
+ # KaTeX æ’件 copy_tex
+ copyTex = true
+ # KaTeX extension mhchem
+ # KaTeX æ’件 mhchem
+ mhchem = true
+ # Mapbox GL JS config (Mapbox GL JS https://docs.mapbox.com/mapbox-gl-js)
+ # Mapbox GL JS é…ç½® (Mapbox GL JS https://docs.mapbox.com/mapbox-gl-js)
+ [params.page.mapbox]
+ # access token of Mapbox GL JS
+ # Mapbox GL JS çš„ access token
+ accessToken = "pk.eyJ1IjoiZGlsbG9uenEiLCJhIjoiY2s2czd2M2x3MDA0NjNmcGxmcjVrZmc2cyJ9.aSjv2BNuZUfARvxRYjSVZQ"
+ # style for the light theme
+ # 浅色主题的地图样å¼
+ lightStyle = "mapbox://styles/mapbox/light-v9?optimize=true"
+ # style for the dark theme
+ # 深色主题的地图样å¼
+ darkStyle = "mapbox://styles/mapbox/dark-v9?optimize=true"
+ # whether to add NavigationControl (https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol)
+ # 是å¦æ·»åŠ  NavigationControl (https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol)
+ navigation = true
+ # whether to add GeolocateControl (https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol)
+ # 是å¦æ·»åŠ  GeolocateControl (https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol)
+ geolocate = true
+ # whether to add ScaleControl (https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol)
+ # 是å¦æ·»åŠ  ScaleControl (https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol)
+ scale = true
+ # whether to add FullscreenControl (https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol)
+ # 是å¦æ·»åŠ  FullscreenControl (https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol)
+ fullscreen = true
+ # Social share links in post page
+ # 文章页é¢çš„分享信æ¯è®¾ç½®
+ [params.page.share]
+ enable = true
+ Twitter = true
+ Facebook = true
+ # Linkedin = true
+ # Whatsapp = true
+ # Pinterest = true
+ # Tumblr = true
+ # HackerNews = true
+ # Reddit = true
+ # VK = true
+ # Buffer = true
+ # Xing = true
+ # Line = true
+ # Instapaper = true
+ # Pocket = true
+ # Digg = true
+ # Stumbleupon = true
+ # Flipboard = true
+ Weibo = true
+ Renren = true
+ # Myspace = true
+ # Blogger = true
+ Baidu = true
+ # Odnoklassniki = true
+ Evernote = true
+ # Skype = true
+ # Trello = true
+ # Mix = true
+ # Comment config
+ # 评论系统设置
+ [params.page.comment]
+ enable = true
+ # Disqus comment config (https://disqus.com/)
+ # Disqus 评论系统设置 (https://disqus.com/)
+ [params.page.comment.disqus]
+ enable = false
+ # Disqus shortname to use Disqus in posts
+ # Disqus çš„ shortname,用æ¥åœ¨æ–‡ç« ä¸­å¯ç”¨ Disqus 评论系统
+ shortname = ""
+ # Gitalk comment config (https://github.com/gitalk/gitalk)
+ # Gitalk 评论系统设置 (https://github.com/gitalk/gitalk)
+ [params.page.comment.gitalk]
+ enable = false
+ owner = ""
+ repo = ""
+ clientId = ""
+ clientSecret = ""
+ # Valine comment config (https://github.com/xCss/Valine)
+ # Valine 评论系统设置 (https://github.com/xCss/Valine)
+ [params.page.comment.valine]
+ enable = true
+ appId = "QGzwQXOqs5JOhN4RGPOkR2mR-MdYXbMMI"
+ appKey = "WBmoGyJtbqUswvfLh6L8iEBr"
+ placeholder = ""
+ notify = false
+ verify = true
+ avatar = "mp"
+ meta= ""
+ pageSize = 10
+ lang = ""
+ visitor = true
+ recordIP = true
+ # Facebook comment config (https://developers.facebook.com/docs/plugins/comments)
+ # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
+ [params.page.comment.facebook]
+ enable = false
+ width = "100%"
+ numPosts = 10
+ appId = ""
+ languageCode = ""
+ # Telegram comments config (https://comments.app/)
+ # Telegram Comments 评论系统设置 (https://comments.app/)
+ [params.page.comment.telegram]
+ enable = false
+ siteID = ""
+ limit = 5
+ height = ""
+ color = ""
+ colorful = true
+ dislikes = false
+ outlined = false
+ # SEO config
+ # SEO é…ç½®
+ [params.page.seo]
+ # Publisher info
+ # 出版者信æ¯
+ [params.page.seo.publisher]
+ name = "xxxx"
+ [params.page.seo.publisher.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Logo info
+ # Logo ä¿¡æ¯
+ [params.page.seo.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Image info
+ # 图片信æ¯
+ [params.page.seo.image]
+ url = "cover.png"
+ width = 800
+ height = 600
# site verification code for Google/Bing/Yandex/Pinterest/Baidu
# 网站验è¯ä»£ç ï¼Œç”¨äºŽ Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
@@ -851,26 +782,6 @@ enableEmoji = true
yandex = ""
pinterest = ""
baidu = ""
- # Publisher Info just for SEO
- # 出版者信æ¯ï¼Œä»…用于 SEO
- [params.publisher]
- name = "xxxx"
- [params.publisher.logo]
- url = "logo.png"
- width = 127
- height = 40
- # Website Log Info just for SEO
- # 网站 Logo ä¿¡æ¯ï¼Œä»…用于 SEO
- [params.logo]
- url = "logo.png"
- width = 127
- height = 40
- # Website Image Info just for SEO
- # 网站图标信æ¯ï¼Œä»…用于 SEO
- [params.image]
- url = "cover.png"
- width = 800
- height = 600
# CSS and JS Files CDN
# CSS 和 JS 文件的 CDN 设置
[params.cdn]
@@ -961,31 +872,30 @@ enableEmoji = true
startLevel = 2
endLevel = 6
-# Author Info
-# 作者信æ¯
+# Author config
+# 作者é…ç½®
[author]
name = "xxxx"
link = ""
-# Sitemap Info
-# 网站地图信æ¯
+# Sitemap config
+# 网站地图é…ç½®
[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-# Permalinks Info (https://gohugo.io/content-management/urls/#permalinks)
-# Permalinks ä¿¡æ¯ (https://gohugo.io/content-management/urls/#permalinks)
+# Permalinks config (https://gohugo.io/content-management/urls/#permalinks)
+# Permalinks é…ç½® (https://gohugo.io/content-management/urls/#permalinks)
[Permalinks]
# posts = ":year/:month/:filename"
posts = ":filename"
-# Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
-# éšç§ä¿¡æ¯è®¾ç½® (https://gohugo.io/about/hugo-and-gdpr/)
+# Privacy config (https://gohugo.io/about/hugo-and-gdpr/)
+# éšç§ä¿¡æ¯é…ç½® (https://gohugo.io/about/hugo-and-gdpr/)
[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
-
[privacy.youtube]
privacyEnhanced = true
diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md
index ee29e4f..17a22d4 100644
--- a/exampleSite/content/about.en.md
+++ b/exampleSite/content/about.en.md
@@ -3,7 +3,8 @@ title: "About LoveIt"
date: 2019-08-02T11:04:49+08:00
draft: false
-math: true
+math:
+ enable: true
lightgallery: true
---
diff --git a/exampleSite/content/about.fr.md b/exampleSite/content/about.fr.md
index 57886ff..d1f6aa5 100644
--- a/exampleSite/content/about.fr.md
+++ b/exampleSite/content/about.fr.md
@@ -3,7 +3,8 @@ title: "À propos de LoveIt"
date: 2019-08-02T11:04:49+08:00
draft: false
-math: true
+math:
+ enable: true
lightgallery: true
---
diff --git a/exampleSite/content/about.zh-cn.md b/exampleSite/content/about.zh-cn.md
index 38d4714..13ecde8 100644
--- a/exampleSite/content/about.zh-cn.md
+++ b/exampleSite/content/about.zh-cn.md
@@ -3,7 +3,8 @@ title: "关于 LoveIt"
date: 2019-08-02T11:04:49+08:00
draft: false
-math: true
+math:
+ enable: true
lightgallery: true
---
diff --git a/exampleSite/content/posts/basic-markdown-syntax.en.md b/exampleSite/content/posts/basic-markdown-syntax.en.md
index cb923b1..26456b1 100644
--- a/exampleSite/content/posts/basic-markdown-syntax.en.md
+++ b/exampleSite/content/posts/basic-markdown-syntax.en.md
@@ -1,38 +1,19 @@
---
weight: 4
title: "Basic Markdown Syntax"
-subtitle: ""
date: 2019-12-01T21:57:40+08:00
lastmod: 2020-01-01T16:45:40+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "This article shows the basic Markdown syntax and format."
-license: ""
tags: ["markdown"]
categories: ["markdown"]
-hiddenFromHomePage: false
featuredImage: "/images/basic-markdown-syntax/featured-image.png"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
This article offers a sample of basic Markdown syntax that can be used in Hugo content files.
diff --git a/exampleSite/content/posts/basic-markdown-syntax.fr.md b/exampleSite/content/posts/basic-markdown-syntax.fr.md
index f1c0f89..13ce18d 100644
--- a/exampleSite/content/posts/basic-markdown-syntax.fr.md
+++ b/exampleSite/content/posts/basic-markdown-syntax.fr.md
@@ -1,38 +1,19 @@
---
weight: 4
title: "Syntaxe de Markdown de Base"
-subtitle: ""
date: 2019-12-01T21:57:40+08:00
lastmod: 2020-01-01T16:45:40+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Cet article présente la syntaxe et le format de base de Markdown."
-license: ""
tags: ["markdown"]
categories: ["markdown"]
-hiddenFromHomePage: false
featuredImage: "/images/basic-markdown-syntax/featured-image.png"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Cet article propose un exemple de syntaxe Markdown de base qui peut être utilisée dans les fichiers de contenu Hugo.
diff --git a/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md b/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md
index a981ae6..9dd866f 100644
--- a/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md
+++ b/exampleSite/content/posts/basic-markdown-syntax.zh-cn.md
@@ -1,38 +1,19 @@
---
weight: 4
title: "Markdown 基本语法"
-subtitle: ""
date: 2019-12-01T21:57:40+08:00
lastmod: 2020-01-01T16:45:40+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "这篇文章展示了基本的 Markdown 语法和格å¼."
-license: ""
tags: ["markdown"]
categories: ["markdown"]
-hiddenFromHomePage: false
featuredImage: "/images/basic-markdown-syntax/featured-image.png"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
这篇文章æ供了å¯ä»¥åœ¨ Hugo 的文章中使用的基本 Markdown 语法示例.
diff --git a/exampleSite/content/posts/emoji-support.en.md b/exampleSite/content/posts/emoji-support.en.md
index ab21b58..d214a6f 100644
--- a/exampleSite/content/posts/emoji-support.en.md
+++ b/exampleSite/content/posts/emoji-support.en.md
@@ -1,38 +1,19 @@
---
weight: 5
title: "Emoji Support"
-subtitle: ""
date: 2019-10-01T17:55:28+08:00
lastmod: 2019-10-01T17:55:28+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Guide to emoji usage in Hugo and LoveIt."
-license: ""
tags: ["emoji"]
categories: ["markdown"]
-hiddenFromHomePage: false
featuredImage: "/images/emoji-support/featured-image.jpg"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Emoji can be enabled in a Hugo project in a number of ways.
diff --git a/exampleSite/content/posts/emoji-support.fr.md b/exampleSite/content/posts/emoji-support.fr.md
index 89fe282..590f874 100644
--- a/exampleSite/content/posts/emoji-support.fr.md
+++ b/exampleSite/content/posts/emoji-support.fr.md
@@ -1,14 +1,12 @@
---
weight: 5
title: "Emoji Support"
-subtitle: ""
date: 2019-10-01T17:55:28+08:00
lastmod: 2019-10-01T17:55:28+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Guide d'utilisation des emoji dans Hugo et LoveIt."
-license: ""
tags: ["emoji"]
categories: ["markdown"]
@@ -17,22 +15,7 @@ hiddenFromHomePage: false
featuredImage: "/images/emoji-support/featured-image.jpg"
featuredImagePreview: ""
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Emoji peut être activé dans un projet Hugo de plusieurs façons.
diff --git a/exampleSite/content/posts/emoji-support.zh-cn.md b/exampleSite/content/posts/emoji-support.zh-cn.md
index 28b5082..aee970f 100644
--- a/exampleSite/content/posts/emoji-support.zh-cn.md
+++ b/exampleSite/content/posts/emoji-support.zh-cn.md
@@ -1,38 +1,19 @@
---
weight: 5
title: "Emoji 支æŒ"
-subtitle: ""
date: 2019-10-01T17:55:28+08:00
lastmod: 2019-10-01T17:55:28+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo å’Œ LoveIt 中的 Emoji 的用法指å—."
-license: ""
tags: ["emoji"]
categories: ["markdown"]
-hiddenFromHomePage: false
featuredImage: "/images/emoji-support/featured-image.jpg"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Emoji å¯ä»¥é€šè¿‡å¤šç§æ–¹å¼åœ¨ Hugo 项目中å¯ç”¨.
diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md
index 3dca60a..4a6525a 100644
--- a/exampleSite/content/posts/theme-documentation-basics.en.md
+++ b/exampleSite/content/posts/theme-documentation-basics.en.md
@@ -1,38 +1,21 @@
---
weight: 1
title: "Theme Documentation - Basics"
-subtitle: ""
date: 2020-03-06T21:29:01+08:00
lastmod: 2020-03-06T21:29:01+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Discover what the Hugo - LoveIt theme is all about and the core-concepts behind it."
-license: ""
tags: ["installation", "configuration"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: false
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
+toc:
+ auto: false
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Discover what the Hugo - **LoveIt** theme is all about and the core-concepts behind it.
@@ -50,7 +33,7 @@ Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-ma
{{< /admonition >}}
{{< admonition note "Why need the Hugo extended version?" >}}
-Since this theme processes SCSS to CSS, Hugo needs to be the **extended** version.
+Since the theme processes SCSS to CSS, Hugo needs to be the **extended** version.
{{< /admonition >}}
## 2 Installation
@@ -102,7 +85,7 @@ theme = "LoveIt"
[params]
# LoveIt theme version
- version = "0.1.X"
+ version = "0.2.X"
[menu]
[[menu.main]]
@@ -145,7 +128,7 @@ hugo new posts/first_post.md
Feel free to edit the post file by adding some sample content and replacing the title value in the beginning of the file.
{{< admonition >}}
-By default all posts and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata or set the property `draft: false`.
+By default all posts and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata, set the property `draft: false` or add `-D`/`--buildDrafts` parameter to `hugo` command.
{{< /admonition >}}
### 2.5 Launching the Website Locally
@@ -164,6 +147,15 @@ Go to `http://localhost:1313`.
When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes.
{{< /admonition >}}
+{{< admonition >}}
+Since the theme use `.Scratch` in Hugo to implement some features,
+it is highly recommended that you add `--disableFastRender` parameter to `hugo server` command for the live preview of the page you are editing.
+
+```bash
+hugo serve --disableFastRender
+```
+{{< /admonition >}}
+
### 2.6 Build the Website
When your site is ready to deploy, run the following command:
@@ -191,8 +183,8 @@ Note that some of these parameters are explained in details in other sections of
```toml
[params]
- # LoveIt theme version
- version = "0.1.X"
+ # {{< version 0.2.0 changed >}} LoveIt theme version
+ version = "0.2.X"
# site description
description = "This is My New Hugo Site"
# site keywords
@@ -204,34 +196,65 @@ Note that some of these parameters are explained in details in other sections of
# {{< version 0.1.1 >}} which hash function used for SRI, when empty, no SRI is used
# ("sha256", "sha384", "sha512", "md5")
fingerprint = ""
- # {{< version 0.2.0 >}} Search
+ # {{< version 0.2.0 >}} date format
+ dateFormat = "2006-01-02"
+
+ # {{< version 0.2.0 >}} Search config
[params.search]
enable = true
# type of search engine ("lunr", "algolia")
type = "lunr"
# index length of the content
contentLength = 5000
+ # placeholder of the search bar
+ placeholder = ""
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
- # Header info
+
+ # Header config
[params.header]
# desktop header mode ("fixed", "normal", "auto")
desktopMode = "fixed"
# mobile header mode ("fixed", "normal", "auto")
mobileMode = "auto"
- # Footer Copyright Info
+
+ # Footer config
[params.footer]
+ enable = true
+ # {{< version 0.2.0 >}} Custom content (HTML format is supported)
+ custom = ''
+ # {{< version 0.2.0 >}} whether to show Hugo and theme info
+ hugo = true
+ # {{< version 0.2.0 >}} whether to show copyright info
+ copyright = true
+ # {{< version 0.2.0 >}} whether to show the author
+ author = true
# Site creation time
since = 2019
# ICP info only in China (HTML format is supported)
icp = ""
# license info (HTML format is supported)
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
- # Home Page Info
+
+ # {{< version 0.2.0 >}} Section (all posts) page config
+ [params.section]
+ # special amount of posts in each section page
+ paginate = 20
+ # date format (month and day)
+ dateFormat = "01-02"
+
+ # {{< version 0.2.0 >}} List (category or tag) page config
+ [params.list]
+ # special amount of posts in each list page
+ paginate = 20
+ # date format (month and day)
+ dateFormat = "01-02"
+
+ # Home page config
[params.home]
- # Home Page Profile
+ # Home page profile
[params.home.profile]
enable = true
# Gravatar Email for preferred avatar in home page
@@ -246,14 +269,15 @@ Note that some of these parameters are explained in details in other sections of
social = true
# {{< version 0.2.0 >}} disclaimer (HTML format is supported)
disclaimer = ""
- # Home Page Posts
+ # Home page posts
[params.home.posts]
enable = true
# special amount of posts in each home posts page
paginate = 6
- # default behavior when you don't set "hiddenFromHomePage" in front matter
+ # {{< version 0.2.0 deleted >}} default behavior when you don't set "hiddenFromHomePage" in front matter
defaultHiddenFromHomePage = false
- # Social Info in home page
+
+ # Social config about the author
[params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
@@ -320,145 +344,166 @@ Note that some of these parameters are explained in details in other sections of
# Matrix = "xxxx"
# Bilibili = "xxxx"
- # Page config
+ # {{< version 0.2.0 changed >}} Page config
[params.page]
- # whether to use lightgallery in the page
- lightgallery = true
- # whether to show link to Raw Markdown content of the post
+ # {{< version 0.2.0 >}} whether to hide a page from home page
+ hiddenFromHomePage = false
+ # {{< version 0.2.0 >}} whether to hide a page from search results
+ hiddenFromSearch = false
+ # whether to enable lightgallery
+ lightgallery = false
+ # {{< version 0.2.0 >}} whether to show the copy button of the code block
+ copyCode = true
+ # {{< version 0.2.0 >}} whether to enable the ruby extended syntax
+ ruby = true
+ # {{< version 0.2.0 >}} whether to enable the fraction extended syntax
+ fraction = true
+ # {{< version 0.2.0 >}} whether to enable the fontawesome extended syntax
+ fontawesome = true
+ # whether to show link to Raw Markdown content of the content
linkToMarkdown = true
- # {{< link "https://katex.org/" KaTeX >}} mathematical formulas
- [params.math]
- enable = true
- # default block delimiter is $$ ... $$ and \\[ ... \\]
- blockLeftDelimiter = ""
- blockRightDelimiter = ""
- # default inline delimiter is $ ... $ and \\( ... \\)
- inlineLeftDelimiter = ""
- inlineRightDelimiter = ""
- # KaTeX extension copy_tex
- copyTex = true
- # KaTeX extension mhchem
- mhchem = true
- # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} config
- [params.mapbox]
- # access token of Mapbox GL JS
- accessToken = ""
- # style for the light theme
- lightStyle = "mapbox://styles/mapbox/light-v9"
- # style for the dark theme
- darkStyle = "mapbox://styles/mapbox/dark-v9"
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
- navigation = true
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
- geolocate = true
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
- scale = true
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
- fullscreen = true
- # Social Share Links in post page
- [params.share]
- enable = true
- Twitter = true
- Facebook = true
- Linkedin = true
- Whatsapp = true
- Pinterest = true
- # Tumblr = true
- HackerNews = true
- # Reddit = true
- # VK = true
- # Buffer = true
- # Xing = true
- # Line = true
- # Instapaper = true
- # Pocket = true
- # Digg = true
- # Stumbleupon = true
- # Flipboard = true
- # Weibo = true
- # Renren = true
- # Myspace = true
- # Blogger = true
- # Baidu = true
- # Odnoklassniki = true
- # Evernote = true
- # Skype = true
- # Trello = true
- # Mix = true
- # Comment Config
- [params.comment]
- enable = true
- # {{< link "https://disqus.com/" Disqus >}} Comment Config
- [params.comment.disqus]
- # {{< version 0.1.1 >}}
- enable = false
- # Disqus shortname to use Disqus in posts
- shortname = ""
- # {{< link "https://github.com/gitalk/gitalk" Gitalk >}} Comment Config
- [params.comment.gitalk]
- # {{< version 0.1.1 >}}
- enable = false
- owner = ""
- repo = ""
- clientId = ""
- clientSecret = ""
- # {{< link "https://github.com/xCss/Valine" Valine >}} Comment Config
- [params.comment.valine]
- enable = false
- appId = ""
- appKey = ""
- placeholder = "Your comment ..."
- notify = false
- verify = true
- avatar = "mp"
- meta= ""
- pageSize = 10
- lang = "en"
- visitor = true
- recordIP = true
- # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook Comment" >}} Config
- [params.comment.facebook]
- enable = false
- width = "100%"
- numPosts = 10
- appId = ""
- languageCode = "en_US"
- # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram Comments" >}} Config
- [params.comment.telegram]
- enable = false
- siteID = ""
- limit = 5
- height = ""
- color = ""
- colorful = true
- dislikes = false
- outlined = false
-
- # site verification code for Google/Bing/Yandex/Pinterest/Baidu
+ # {{< version 0.2.0 >}} Table of the contents config
+ [params.page.toc]
+ # whether to enable the table of the contents
+ enable = true
+ # whether to make the table of the contents automatically collapsed
+ auto = true
+ # {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas
+ [params.page.math]
+ enable = true
+ # default block delimiter is $$ ... $$ and \\[ ... \\]
+ blockLeftDelimiter = ""
+ blockRightDelimiter = ""
+ # default inline delimiter is $ ... $ and \\( ... \\)
+ inlineLeftDelimiter = ""
+ inlineRightDelimiter = ""
+ # KaTeX extension copy_tex
+ copyTex = true
+ # KaTeX extension mhchem
+ mhchem = true
+ # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} config
+ [params.page.mapbox]
+ # access token of Mapbox GL JS
+ accessToken = ""
+ # style for the light theme
+ lightStyle = "mapbox://styles/mapbox/light-v9"
+ # style for the dark theme
+ darkStyle = "mapbox://styles/mapbox/dark-v9"
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
+ navigation = true
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
+ geolocate = true
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
+ scale = true
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
+ fullscreen = true
+ # {{< version 0.2.0 changed >}} social share links in post page
+ [params.page.share]
+ enable = true
+ Twitter = true
+ Facebook = true
+ Linkedin = true
+ Whatsapp = true
+ Pinterest = true
+ # Tumblr = true
+ HackerNews = true
+ # Reddit = true
+ # VK = true
+ # Buffer = true
+ # Xing = true
+ # Line = true
+ # Instapaper = true
+ # Pocket = true
+ # Digg = true
+ # Stumbleupon = true
+ # Flipboard = true
+ # Weibo = true
+ # Renren = true
+ # Myspace = true
+ # Blogger = true
+ # Baidu = true
+ # Odnoklassniki = true
+ # Evernote = true
+ # Skype = true
+ # Trello = true
+ # Mix = true
+ # {{< version 0.2.0 changed >}} Comment config
+ [params.page.comment]
+ enable = true
+ # {{< link "https://disqus.com/" Disqus >}} comment config
+ [params.page.comment.disqus]
+ # {{< version 0.1.1 >}}
+ enable = false
+ # Disqus shortname to use Disqus in posts
+ shortname = ""
+ # {{< link "https://github.com/gitalk/gitalk" Gitalk >}} comment config
+ [params.page.comment.gitalk]
+ # {{< version 0.1.1 >}}
+ enable = false
+ owner = ""
+ repo = ""
+ clientId = ""
+ clientSecret = ""
+ # {{< link "https://github.com/xCss/Valine" Valine >}} comment config
+ [params.page.comment.valine]
+ enable = false
+ appId = ""
+ appKey = ""
+ placeholder = ""
+ notify = false
+ verify = true
+ avatar = "mp"
+ meta= ""
+ pageSize = 10
+ lang = ""
+ visitor = true
+ recordIP = true
+ # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config
+ [params.page.comment.facebook]
+ enable = false
+ width = "100%"
+ numPosts = 10
+ appId = ""
+ languageCode = ""
+ # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram comments" >}} config
+ [params.page.comment.telegram]
+ enable = false
+ siteID = ""
+ limit = 5
+ height = ""
+ color = ""
+ colorful = true
+ dislikes = false
+ outlined = false
+ # {{< version 0.2.0 >}} SEO config
+ [params.page.seo]
+ # Publisher info
+ [params.page.seo.publisher]
+ name = "xxxx"
+ [params.page.seo.publisher.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Logo info
+ [params.page.seo.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Image info
+ [params.page.seo.image]
+ url = "cover.png"
+ width = 800
+ height = 600
+
+ # Site verification code config for Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
google = ""
bing = ""
yandex = ""
pinterest = ""
baidu = ""
- # Publisher Info just for SEO
- [params.publisher]
- name = "xxxx"
- [params.publisher.logo]
- url = "logo.png"
- width = 127
- height = 40
- # Website Log Info just for SEO
- [params.logo]
- url = "logo.png"
- width = 127
- height = 40
- # Website Image Info just for SEO
- [params.image]
- url = "cover.png"
- width = 800
- height = 600
- # CSS and JS Files CDN
+
+ # CSS and JS Files CDN config
[params.cdn]
# {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1
normalizeCSS = ''
@@ -513,7 +558,7 @@ Note that some of these parameters are explained in details in other sections of
# {{< link "https://valine.js.org/" "valine" >}}@1.3.10
valineJS = ''
-# Markup related configuration in Hugo
+# Markup related config in Hugo
[markup]
# {{< link "https://gohugo.io/content-management/syntax-highlighting" "Syntax Highlighting" >}}
[markup.highlight]
@@ -542,27 +587,26 @@ Note that some of these parameters are explained in details in other sections of
startLevel = 2
endLevel = 6
-# Author Info
+# Author config
[author]
name = "xxxx"
link = ""
-# Sitemap Info
+# Sitemap config
[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks Info" >}}
+# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks config" >}}
[Permalinks]
# posts = ":year/:month/:filename"
posts = ":filename"
-# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy Info" >}}
+# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy config" >}}
[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
-
[privacy.youtube]
privacyEnhanced = true
diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md
index c5d9715..2fe53e0 100644
--- a/exampleSite/content/posts/theme-documentation-basics.fr.md
+++ b/exampleSite/content/posts/theme-documentation-basics.fr.md
@@ -1,38 +1,21 @@
---
weight: 1
title: "Thème Documentation - Concepts de Base"
-subtitle: ""
date: 2020-03-06T21:40:32+08:00
lastmod: 2020-03-06T21:40:32+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Découvrez en quoi consiste le thème Hugo - LoveIt et les concepts fondamentaux qui le sous-tendent."
-license: ""
tags: ["installation", "configuration"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: false
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
+toc:
+ auto: false
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Découvrez en quoi consiste le thème Hugo - **LoveIt** et les concepts fondamentaux qui le sous-tendent.
@@ -55,7 +38,7 @@ Since [Markdown Render Hooks](https://gohugo.io/getting-started/configuration-ma
{{< /admonition >}}
{{< admonition note "Why need the Hugo extended version?" >}}
-Since this theme processes SCSS to CSS, Hugo needs to be the **extended** version.
+Since the theme processes SCSS to CSS, Hugo needs to be the **extended** version.
{{< /admonition >}}
## 2 Installation
@@ -107,7 +90,7 @@ theme = "LoveIt"
[params]
# LoveIt theme version
- version = "0.1.X"
+ version = "0.2.X"
[menu]
[[menu.main]]
@@ -150,7 +133,7 @@ hugo new posts/first_post.md
Feel free to edit the post file by adding some sample content and replacing the title value in the beginning of the file.
{{< admonition >}}
-By default all posts and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata or set the property `draft: false`.
+By default all posts and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata, set the property `draft: false` or add `-D`/`--buildDrafts` parameter to `hugo` command.
{{< /admonition >}}
### 2.5 Launching the Website Locally
@@ -169,6 +152,15 @@ Go to `http://localhost:1313`.
When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes.
{{< /admonition >}}
+{{< admonition >}}
+Since the theme use `.Scratch` in Hugo to implement some features,
+it is highly recommended that you add `--disableFastRender` parameter to `hugo server` command for the live preview of the page you are editing.
+
+```bash
+hugo serve --disableFastRender
+```
+{{< /admonition >}}
+
### 2.6 Build the Website
When your site is ready to deploy, run the following command:
@@ -196,8 +188,8 @@ Note that some of these parameters are explained in details in other sections of
```toml
[params]
- # LoveIt theme version
- version = "0.1.X"
+ # {{< version 0.2.0 changed >}} LoveIt theme version
+ version = "0.2.X"
# site description
description = "This is My New Hugo Site"
# site keywords
@@ -209,34 +201,65 @@ Note that some of these parameters are explained in details in other sections of
# {{< version 0.1.1 >}} which hash function used for SRI, when empty, no SRI is used
# ("sha256", "sha384", "sha512", "md5")
fingerprint = ""
- # {{< version 0.2.0 >}} Search
+ # {{< version 0.2.0 >}} date format
+ dateFormat = "2006-01-02"
+
+ # {{< version 0.2.0 >}} Search config
[params.search]
enable = true
# type of search engine ("lunr", "algolia")
type = "lunr"
# index length of the content
contentLength = 5000
+ # placeholder of the search bar
+ placeholder = ""
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
- # Header info
+
+ # Header config
[params.header]
# desktop header mode ("fixed", "normal", "auto")
desktopMode = "fixed"
# mobile header mode ("fixed", "normal", "auto")
mobileMode = "auto"
- # Footer Copyright Info
+
+ # Footer config
[params.footer]
+ enable = true
+ # {{< version 0.2.0 >}} Custom content (HTML format is supported)
+ custom = ''
+ # {{< version 0.2.0 >}} whether to show Hugo and theme info
+ hugo = true
+ # {{< version 0.2.0 >}} whether to show copyright info
+ copyright = true
+ # {{< version 0.2.0 >}} whether to show the author
+ author = true
# Site creation time
since = 2019
# ICP info only in China (HTML format is supported)
icp = ""
# license info (HTML format is supported)
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
- # Home Page Info
+
+ # {{< version 0.2.0 >}} Section (all posts) page config
+ [params.section]
+ # special amount of posts in each section page
+ paginate = 20
+ # date format (month and day)
+ dateFormat = "01-02"
+
+ # {{< version 0.2.0 >}} List (category or tag) page config
+ [params.list]
+ # special amount of posts in each list page
+ paginate = 20
+ # date format (month and day)
+ dateFormat = "01-02"
+
+ # Home page config
[params.home]
- # Home Page Profile
+ # Home page profile
[params.home.profile]
enable = true
# Gravatar Email for preferred avatar in home page
@@ -251,14 +274,15 @@ Note that some of these parameters are explained in details in other sections of
social = true
# {{< version 0.2.0 >}} disclaimer (HTML format is supported)
disclaimer = ""
- # Home Page Posts
+ # Home page posts
[params.home.posts]
enable = true
# special amount of posts in each home posts page
paginate = 6
- # default behavior when you don't set "hiddenFromHomePage" in front matter
+ # {{< version 0.2.0 deleted >}} default behavior when you don't set "hiddenFromHomePage" in front matter
defaultHiddenFromHomePage = false
- # Social Info in home page
+
+ # Social config about the author
[params.social]
GitHub = "xxxx"
Linkedin = "xxxx"
@@ -325,145 +349,166 @@ Note that some of these parameters are explained in details in other sections of
# Matrix = "xxxx"
# Bilibili = "xxxx"
- # Page config
+ # {{< version 0.2.0 changed >}} Page config
[params.page]
- # whether to use lightgallery in the page
- lightgallery = true
- # whether to show link to Raw Markdown content of the post
+ # {{< version 0.2.0 >}} whether to hide a page from home page
+ hiddenFromHomePage = false
+ # {{< version 0.2.0 >}} whether to hide a page from search results
+ hiddenFromSearch = false
+ # whether to enable lightgallery
+ lightgallery = false
+ # {{< version 0.2.0 >}} whether to show the copy button of the code block
+ copyCode = true
+ # {{< version 0.2.0 >}} whether to enable the ruby extended syntax
+ ruby = true
+ # {{< version 0.2.0 >}} whether to enable the fraction extended syntax
+ fraction = true
+ # {{< version 0.2.0 >}} whether to enable the fontawesome extended syntax
+ fontawesome = true
+ # whether to show link to Raw Markdown content of the content
linkToMarkdown = true
- # {{< link "https://katex.org/" KaTeX >}} mathematical formulas
- [params.math]
- enable = true
- # default block delimiter is $$ ... $$ and \\[ ... \\]
- blockLeftDelimiter = ""
- blockRightDelimiter = ""
- # default inline delimiter is $ ... $ and \\( ... \\)
- inlineLeftDelimiter = ""
- inlineRightDelimiter = ""
- # KaTeX extension copy_tex
- copyTex = true
- # KaTeX extension mhchem
- mhchem = true
- # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} config
- [params.mapbox]
- # access token of Mapbox GL JS
- accessToken = ""
- # style for the light theme
- lightStyle = "mapbox://styles/mapbox/light-v9"
- # style for the dark theme
- darkStyle = "mapbox://styles/mapbox/dark-v9"
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
- navigation = true
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
- geolocate = true
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
- scale = true
- # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
- fullscreen = true
- # Social Share Links in post page
- [params.share]
- enable = true
- Twitter = true
- Facebook = true
- Linkedin = true
- Whatsapp = true
- Pinterest = true
- # Tumblr = true
- HackerNews = true
- # Reddit = true
- # VK = true
- # Buffer = true
- # Xing = true
- # Line = true
- # Instapaper = true
- # Pocket = true
- # Digg = true
- # Stumbleupon = true
- # Flipboard = true
- # Weibo = true
- # Renren = true
- # Myspace = true
- # Blogger = true
- # Baidu = true
- # Odnoklassniki = true
- # Evernote = true
- # Skype = true
- # Trello = true
- # Mix = true
- # Comment Config
- [params.comment]
- enable = true
- # {{< link "https://disqus.com/" Disqus >}} Comment Config
- [params.comment.disqus]
- # {{< version 0.1.1 >}}
- enable = false
- # Disqus shortname to use Disqus in posts
- shortname = ""
- # {{< link "https://github.com/gitalk/gitalk" Gitalk >}} Comment Config
- [params.comment.gitalk]
- # {{< version 0.1.1 >}}
- enable = false
- owner = ""
- repo = ""
- clientId = ""
- clientSecret = ""
- # {{< link "https://github.com/xCss/Valine" Valine >}} Comment Config
- [params.comment.valine]
- enable = false
- appId = ""
- appKey = ""
- placeholder = "Your comment ..."
- notify = false
- verify = true
- avatar = "mp"
- meta= ""
- pageSize = 10
- lang = "en"
- visitor = true
- recordIP = true
- # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook Comment" >}} Config
- [params.comment.facebook]
- enable = false
- width = "100%"
- numPosts = 10
- appId = ""
- languageCode = "en_US"
- # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram Comments" >}} Config
- [params.comment.telegram]
- enable = false
- siteID = ""
- limit = 5
- height = ""
- color = ""
- colorful = true
- dislikes = false
- outlined = false
-
- # site verification code for Google/Bing/Yandex/Pinterest/Baidu
+ # {{< version 0.2.0 >}} Table of the contents config
+ [params.page.toc]
+ # whether to enable the table of the contents
+ enable = true
+ # whether to make the table of the contents automatically collapsed
+ auto = true
+ # {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} mathematical formulas
+ [params.page.math]
+ enable = true
+ # default block delimiter is $$ ... $$ and \\[ ... \\]
+ blockLeftDelimiter = ""
+ blockRightDelimiter = ""
+ # default inline delimiter is $ ... $ and \\( ... \\)
+ inlineLeftDelimiter = ""
+ inlineRightDelimiter = ""
+ # KaTeX extension copy_tex
+ copyTex = true
+ # KaTeX extension mhchem
+ mhchem = true
+ # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} config
+ [params.page.mapbox]
+ # access token of Mapbox GL JS
+ accessToken = ""
+ # style for the light theme
+ lightStyle = "mapbox://styles/mapbox/light-v9"
+ # style for the dark theme
+ darkStyle = "mapbox://styles/mapbox/dark-v9"
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
+ navigation = true
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
+ geolocate = true
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
+ scale = true
+ # whether to add {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
+ fullscreen = true
+ # {{< version 0.2.0 changed >}} social share links in post page
+ [params.page.share]
+ enable = true
+ Twitter = true
+ Facebook = true
+ Linkedin = true
+ Whatsapp = true
+ Pinterest = true
+ # Tumblr = true
+ HackerNews = true
+ # Reddit = true
+ # VK = true
+ # Buffer = true
+ # Xing = true
+ # Line = true
+ # Instapaper = true
+ # Pocket = true
+ # Digg = true
+ # Stumbleupon = true
+ # Flipboard = true
+ # Weibo = true
+ # Renren = true
+ # Myspace = true
+ # Blogger = true
+ # Baidu = true
+ # Odnoklassniki = true
+ # Evernote = true
+ # Skype = true
+ # Trello = true
+ # Mix = true
+ # {{< version 0.2.0 changed >}} Comment config
+ [params.page.comment]
+ enable = true
+ # {{< link "https://disqus.com/" Disqus >}} comment config
+ [params.page.comment.disqus]
+ # {{< version 0.1.1 >}}
+ enable = false
+ # Disqus shortname to use Disqus in posts
+ shortname = ""
+ # {{< link "https://github.com/gitalk/gitalk" Gitalk >}} comment config
+ [params.page.comment.gitalk]
+ # {{< version 0.1.1 >}}
+ enable = false
+ owner = ""
+ repo = ""
+ clientId = ""
+ clientSecret = ""
+ # {{< link "https://github.com/xCss/Valine" Valine >}} comment config
+ [params.page.comment.valine]
+ enable = false
+ appId = ""
+ appKey = ""
+ placeholder = ""
+ notify = false
+ verify = true
+ avatar = "mp"
+ meta= ""
+ pageSize = 10
+ lang = ""
+ visitor = true
+ recordIP = true
+ # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config
+ [params.page.comment.facebook]
+ enable = false
+ width = "100%"
+ numPosts = 10
+ appId = ""
+ languageCode = ""
+ # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram comments" >}} config
+ [params.page.comment.telegram]
+ enable = false
+ siteID = ""
+ limit = 5
+ height = ""
+ color = ""
+ colorful = true
+ dislikes = false
+ outlined = false
+ # {{< version 0.2.0 >}} SEO config
+ [params.page.seo]
+ # Publisher info
+ [params.page.seo.publisher]
+ name = "xxxx"
+ [params.page.seo.publisher.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Logo info
+ [params.page.seo.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Image info
+ [params.page.seo.image]
+ url = "cover.png"
+ width = 800
+ height = 600
+
+ # Site verification code config for Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
google = ""
bing = ""
yandex = ""
pinterest = ""
baidu = ""
- # Publisher Info just for SEO
- [params.publisher]
- name = "xxxx"
- [params.publisher.logo]
- url = "logo.png"
- width = 127
- height = 40
- # Website Log Info just for SEO
- [params.logo]
- url = "logo.png"
- width = 127
- height = 40
- # Website Image Info just for SEO
- [params.image]
- url = "cover.png"
- width = 800
- height = 600
- # CSS and JS Files CDN
+
+ # CSS and JS Files CDN config
[params.cdn]
# {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1
normalizeCSS = ''
@@ -518,7 +563,7 @@ Note that some of these parameters are explained in details in other sections of
# {{< link "https://valine.js.org/" "valine" >}}@1.3.10
valineJS = ''
-# Markup related configuration in Hugo
+# Markup related config in Hugo
[markup]
# {{< link "https://gohugo.io/content-management/syntax-highlighting" "Syntax Highlighting" >}}
[markup.highlight]
@@ -547,27 +592,26 @@ Note that some of these parameters are explained in details in other sections of
startLevel = 2
endLevel = 6
-# Author Info
+# Author config
[author]
name = "xxxx"
link = ""
-# Sitemap Info
+# Sitemap config
[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks Info" >}}
+# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks config" >}}
[Permalinks]
# posts = ":year/:month/:filename"
posts = ":filename"
-# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy Info" >}}
+# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "Privacy config" >}}
[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
-
[privacy.youtube]
privacyEnhanced = true
diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
index 561f342..31ad7e5 100644
--- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
+++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md
@@ -1,38 +1,21 @@
---
weight: 1
title: "主题文档 - 基本概念"
-subtitle: ""
date: 2020-03-06T21:40:32+08:00
lastmod: 2020-03-06T21:40:32+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "探索 Hugo - LoveIt 主题的全部内容和背åŽçš„核心概念."
-license: ""
tags: ["安装", "é…ç½®"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-basics/featured-image.jpg"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: false
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
+toc:
+ auto: false
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
探索 Hugo - **LoveIt** 主题的全部内容和背åŽçš„核心概念.
@@ -105,7 +88,7 @@ theme = "LoveIt"
[params]
# LoveIt 主题版本
- version = "0.1.X"
+ version = "0.2.X"
[menu]
[[menu.main]]
@@ -148,7 +131,7 @@ hugo new posts/first_post.md
通过添加一些示例内容并替æ¢æ–‡ä»¶å¼€å¤´çš„标题, ä½ å¯ä»¥éšæ„编辑文章.
{{< admonition >}}
-默认情况下, 所有文章和页é¢å‡ä½œä¸ºè‰ç¨¿åˆ›å»º. 如果想è¦æ¸²æŸ“这些页é¢, 请从元数æ®ä¸­åˆ é™¤å±žæ€§ `draft: true`, 或者设置属性 `draft: false`.
+默认情况下, 所有文章和页é¢å‡ä½œä¸ºè‰ç¨¿åˆ›å»º. 如果想è¦æ¸²æŸ“这些页é¢, 请从元数æ®ä¸­åˆ é™¤å±žæ€§ `draft: true`, 设置属性 `draft: false` 或者为 `hugo` 命令添加 `-D`/`--buildDrafts` å‚æ•°.
{{< /admonition >}}
### 2.5 在本地å¯åŠ¨ç½‘ç«™
@@ -167,6 +150,15 @@ hugo serve
当你è¿è¡Œ `hugo serve` æ—¶, 当文件内容更改时, 页é¢ä¼šéšç€æ›´æ”¹è‡ªåŠ¨åˆ·æ–°.
{{< /admonition >}}
+{{< admonition >}}
+由于本主题使用了 Hugo 中的 `.Scratch` æ¥å®žçŽ°ä¸€äº›ç‰¹æ€§,
+éžå¸¸å»ºè®®ä½ ä¸º `hugo server` 命令添加 `--disableFastRender` å‚æ•°æ¥å®žæ—¶é¢„览你正在编辑的文章页é¢.
+
+```bash
+hugo serve --disableFastRender
+```
+{{< /admonition >}}
+
### 2.6 构建网站
当你准备好部署你的网站时, è¿è¡Œä»¥ä¸‹å‘½ä»¤:
@@ -194,8 +186,8 @@ hugo
```toml
[params]
- # LoveIt 主题版本
- version = "0.1.X"
+ # {{< version 0.2.0 changed >}} LoveIt 主题版本
+ version = "0.2.X"
# 网站æè¿°
description = "这是我的全新 Hugo 网站"
# 网站关键è¯
@@ -207,34 +199,65 @@ hugo
# {{< version 0.1.1 >}} 哪ç§å“ˆå¸Œå‡½æ•°ç”¨æ¥ SRI, 为空时表示ä¸ä½¿ç”¨ SRI
# ("sha256", "sha384", "sha512", "md5")
fingerprint = ""
- # {{< version 0.2.0 >}} æœç´¢
+ # {{< version 0.2.0 >}} 日期格å¼
+ dateFormat = "2006-01-02"
+
+ # {{< version 0.2.0 >}} æœç´¢é…ç½®
[params.search]
enable = true
# æœç´¢å¼•æ“Žçš„类型 ("lunr", "algolia")
type = "lunr"
# 文章内容索引长度
contentLength = 5000
+ # æœç´¢æ¡†çš„å ä½æ示语
+ placeholder = ""
[params.search.algolia]
index = ""
appID = ""
searchKey = ""
- # 页é¢å¤´éƒ¨å¯¼èˆªæ ä¿¡æ¯
+
+ # 页é¢å¤´éƒ¨å¯¼èˆªæ é…ç½®
[params.header]
# æ¡Œé¢ç«¯å¯¼èˆªæ æ¨¡å¼ ("fixed", "normal", "auto")
desktopMode = "fixed"
# 移动端导航æ æ¨¡å¼ ("fixed", "normal", "auto")
mobileMode = "auto"
- # 页é¢åº•éƒ¨ç‰ˆæƒä¿¡æ¯è®¾ç½®
+
+ # 页é¢åº•éƒ¨ä¿¡æ¯é…ç½®
[params.footer]
+ enable = true
+ # {{< version 0.2.0 >}} 自定义内容 (æ”¯æŒ HTML æ ¼å¼)
+ custom = ''
+ # {{< version 0.2.0 >}} 是å¦æ˜¾ç¤º Hugo 和主题信æ¯
+ hugo = true
+ # {{< version 0.2.0 >}} 是å¦æ˜¾ç¤ºç‰ˆæƒä¿¡æ¯
+ copyright = true
+ # {{< version 0.2.0 >}} 是å¦æ˜¾ç¤ºä½œè€…
+ author = true
# 网站创立年份
since = 2019
# ICP 备案信æ¯ï¼Œä»…在中国使用 (æ”¯æŒ HTML æ ¼å¼)
icp = ""
# 许å¯åè®®ä¿¡æ¯ (æ”¯æŒ HTML æ ¼å¼)
license = '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
- # 文章页é¢é…ç½®
+
+ # {{< version 0.2.0 >}} Section (所有文章) 页é¢é…ç½®
+ [params.section]
+ # section 页é¢æ¯é¡µæ˜¾ç¤ºæ–‡ç« æ•°é‡
+ paginate = 20
+ # æ—¥æœŸæ ¼å¼ (月和日)
+ dateFormat = "01-02"
+
+ # {{< version 0.2.0 >}} List (目录或标签) 页é¢é…ç½®
+ [params.list]
+ # list 页é¢æ¯é¡µæ˜¾ç¤ºæ–‡ç« æ•°é‡
+ paginate = 20
+ # æ—¥æœŸæ ¼å¼ (月和日)
+ dateFormat = "01-02"
+
+ # 主页é…ç½®
[params.home]
- # 主页信æ¯è®¾ç½®
+ # 主页个人信æ¯
[params.home.profile]
enable = true
# Gravatar 邮箱,用于优先在主页显示的头åƒ
@@ -254,9 +277,10 @@ hugo
enable = true
# 主页æ¯é¡µæ˜¾ç¤ºæ–‡ç« æ•°é‡
paginate = 6
- # 当你没有在文章å‰ç½®å‚数中设置 "hiddenFromHomePage" 时的默认行为
+ # {{< version 0.2.0 deleted >}} 当你没有在文章å‰ç½®å‚数中设置 "hiddenFromHomePage" 时的默认行为
defaultHiddenFromHomePage = false
- # 主页的社交信æ¯è®¾ç½®
+
+ # 作者的社交信æ¯è®¾ç½®
[params.social]
GitHub = "xxxx"
# Linkedin = "xxxx"
@@ -322,119 +346,157 @@ hugo
# XMPP = "xxxx"
# Matrix = "xxxx"
Bilibili = "xxxx"
- # 文章页é¢é…ç½®
+
+ # {{< version 0.2.0 changed >}} 文章页é¢é…ç½®
[params.page]
+ # {{< version 0.2.0 >}} 是å¦åœ¨ä¸»é¡µéšè—一篇文章
+ hiddenFromHomePage = false
+ # {{< version 0.2.0 >}} 是å¦åœ¨æœç´¢ç»“果中éšè—一篇文章
+ hiddenFromSearch = false
# 是å¦åœ¨æ–‡ç« é¡µé¢ä½¿ç”¨ lightgallery
lightgallery = true
+ # {{< version 0.2.0 >}} 是å¦æ˜¾ç¤ºä»£ç å—çš„å¤åˆ¶æŒ‰é’®
+ copyCode = true
+ # {{< version 0.2.0 >}} 是å¦ä½¿ç”¨ ruby 扩展语法
+ ruby = true
+ # {{< version 0.2.0 >}} 是å¦ä½¿ç”¨ fraction 扩展语法
+ fraction = true
+ # {{< version 0.2.0 >}} 是å¦ä½¿ç”¨ fontawesome 扩展语法
+ fontawesome = true
# 是å¦åœ¨æ–‡ç« é¡µé¢æ˜¾ç¤ºåŽŸå§‹ Markdown 文档链接
linkToMarkdown = true
- # {{< link "https://katex.org/" KaTeX >}} 数学公å¼
- [params.math]
- enable = true
- # 默认å—定界符是 $$ ... $$ å’Œ \\[ ... \\]
- blockLeftDelimiter = ""
- blockRightDelimiter = ""
- # 默认内è”定界符是 $ ... $ å’Œ \\( ... \\)
- inlineLeftDelimiter = ""
- inlineRightDelimiter = ""
- # KaTeX æ’件 copy_tex
- copyTex = true
- # KaTeX æ’件 mhchem
- mhchem = true
- # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} é…ç½®
- [params.mapbox]
- # Mapbox GL JS çš„ access token
- accessToken = ""
- # 浅色主题的地图样å¼
- lightStyle = "mapbox://styles/mapbox/light-v9"
- # 深色主题的地图样å¼
- darkStyle = "mapbox://styles/mapbox/dark-v9"
- # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
- navigation = true
- # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
- geolocate = true
- # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
- scale = true
- # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
- fullscreen = true
- # 文章页é¢çš„分享信æ¯è®¾ç½®
- [params.share]
- enable = true
- Twitter = true
- Facebook = true
- # Linkedin = true
- # Whatsapp = true
- # Pinterest = true
- # Tumblr = true
- # HackerNews = true
- # Reddit = true
- # VK = true
- # Buffer = true
- # Xing = true
- # Line = true
- # Instapaper = true
- # Pocket = true
- # Digg = true
- # Stumbleupon = true
- # Flipboard = true
- Weibo = true
- # Renren = true
- # Myspace = true
- # Blogger = true
- # Baidu = true
- # Odnoklassniki = true
- Evernote = true
- # Skype = true
- # Trello = true
- # Mix = true
- # 评论系统设置
- [params.comment]
- enable = true
- # {{< link "https://disqus.com/" Disqus >}} 评论系统设置
- [params.comment.disqus]
- # {{< version 0.1.1 >}}
- enable = false
- # Disqus çš„ shortname,用æ¥åœ¨æ–‡ç« ä¸­å¯ç”¨ Disqus 评论系统
- shortname = ""
- # {{< link "https://github.com/gitalk/gitalk" Gitalk >}} 评论系统设置
- [params.comment.gitalk]
- # {{< version 0.1.1 >}}
- enable = false
- owner = ""
- repo = ""
- clientId = ""
- clientSecret = ""
- # {{< link "https://github.com/xCss/Valine" Valine >}} 评论系统设置
- [params.comment.valine]
- enable = false
- appId = ""
- appKey = ""
- placeholder = "Your comment ..."
- notify = false
- verify = true
- avatar = "mp"
- meta= ""
- pageSize = 10
- lang = "en"
- visitor = true
- recordIP = true
- # # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置
- [params.comment.facebook]
- enable = false
- width = "100%"
- numPosts = 10
- appId = ""
- languageCode = "zh_CN"
- # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram Comments" >}} 评论系统设置
- [params.comment.telegram]
- enable = false
- siteID = ""
- limit = 5
- height = ""
- color = ""
- colorful = true
- dislikes = false
- outlined = false
+ # {{< version 0.2.0 >}} 目录é…ç½®
+ [params.page.toc]
+ # 是å¦ä½¿ç”¨ç›®å½•
+ enable = true
+ # 是å¦ä½¿ç›®å½•è‡ªåŠ¨æŠ˜å å±•å¼€
+ auto = true
+ # {{< version 0.2.0 changed >}} {{< link "https://katex.org/" KaTeX >}} 数学公å¼
+ [params.page.math]
+ enable = true
+ # 默认å—定界符是 $$ ... $$ å’Œ \\[ ... \\]
+ blockLeftDelimiter = ""
+ blockRightDelimiter = ""
+ # 默认内è”定界符是 $ ... $ å’Œ \\( ... \\)
+ inlineLeftDelimiter = ""
+ inlineRightDelimiter = ""
+ # KaTeX æ’件 copy_tex
+ copyTex = true
+ # KaTeX æ’件 mhchem
+ mhchem = true
+ # {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" "Mapbox GL JS" >}} é…ç½®
+ [params.page.mapbox]
+ # Mapbox GL JS çš„ access token
+ accessToken = ""
+ # 浅色主题的地图样å¼
+ lightStyle = "mapbox://styles/mapbox/light-v9"
+ # 深色主题的地图样å¼
+ darkStyle = "mapbox://styles/mapbox/dark-v9"
+ # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol" NavigationControl >}}
+ navigation = true
+ # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol" GeolocateControl >}}
+ geolocate = true
+ # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#scalecontrol" ScaleControl >}}
+ scale = true
+ # 是å¦æ·»åŠ  {{< link "https://docs.mapbox.com/mapbox-gl-js/api/#fullscreencontrol" FullscreenControl >}}
+ fullscreen = true
+ # {{< version 0.2.0 changed >}} 文章页é¢çš„分享信æ¯è®¾ç½®
+ [params.page.share]
+ enable = true
+ Twitter = true
+ Facebook = true
+ # Linkedin = true
+ # Whatsapp = true
+ # Pinterest = true
+ # Tumblr = true
+ # HackerNews = true
+ # Reddit = true
+ # VK = true
+ # Buffer = true
+ # Xing = true
+ # Line = true
+ # Instapaper = true
+ # Pocket = true
+ # Digg = true
+ # Stumbleupon = true
+ # Flipboard = true
+ Weibo = true
+ # Renren = true
+ # Myspace = true
+ # Blogger = true
+ # Baidu = true
+ # Odnoklassniki = true
+ Evernote = true
+ # Skype = true
+ # Trello = true
+ # Mix = true
+ # {{< version 0.2.0 changed >}} 评论系统设置
+ [params.page.comment]
+ enable = true
+ # {{< link "https://disqus.com/" Disqus >}} 评论系统设置
+ [params.page.comment.disqus]
+ # {{< version 0.1.1 >}}
+ enable = false
+ # Disqus çš„ shortname,用æ¥åœ¨æ–‡ç« ä¸­å¯ç”¨ Disqus 评论系统
+ shortname = ""
+ # {{< link "https://github.com/gitalk/gitalk" Gitalk >}} 评论系统设置
+ [params.page.comment.gitalk]
+ # {{< version 0.1.1 >}}
+ enable = false
+ owner = ""
+ repo = ""
+ clientId = ""
+ clientSecret = ""
+ # {{< link "https://github.com/xCss/Valine" Valine >}} 评论系统设置
+ [params.page.comment.valine]
+ enable = false
+ appId = ""
+ appKey = ""
+ placeholder = "Your comment ..."
+ notify = false
+ verify = true
+ avatar = "mp"
+ meta= ""
+ pageSize = 10
+ lang = "en"
+ visitor = true
+ recordIP = true
+ # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置
+ [params.page.comment.facebook]
+ enable = false
+ width = "100%"
+ numPosts = 10
+ appId = ""
+ languageCode = "zh_CN"
+ # {{< version 0.2.0 >}} {{< link "https://comments.app/" "Telegram Comments" >}} 评论系统设置
+ [params.page.comment.telegram]
+ enable = false
+ siteID = ""
+ limit = 5
+ height = ""
+ color = ""
+ colorful = true
+ dislikes = false
+ outlined = false
+ # {{< version 0.2.0 >}} SEO config
+ [params.page.seo]
+ # 出版者信æ¯
+ [params.page.seo.publisher]
+ name = "xxxx"
+ [params.page.seo.publisher.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # Logo ä¿¡æ¯
+ [params.page.seo.logo]
+ url = "logo.png"
+ width = 127
+ height = 40
+ # 图片信æ¯
+ [params.page.seo.image]
+ url = "cover.png"
+ width = 800
+ height = 600
# 网站验è¯ä»£ç ï¼Œç”¨äºŽ Google/Bing/Yandex/Pinterest/Baidu
[params.verification]
@@ -443,23 +505,7 @@ hugo
yandex = ""
pinterest = ""
baidu = ""
- # 出版者信æ¯ï¼Œä»…用于 SEO
- [params.publisher]
- name = "xxxx"
- [params.publisher.logo]
- url = "logo.png"
- width = 127
- height = 40
- # 网站 Logo ä¿¡æ¯ï¼Œä»…用于 SEO
- [params.logo]
- url = "logo.png"
- width = 127
- height = 40
- # 网站图标信æ¯ï¼Œä»…用于 SEO
- [params.image]
- url = "cover.png"
- width = 800
- height = 600
+
# CSS 和 JS 文件的 CDN 设置
[params.cdn]
# {{< version 0.2.0 >}} {{< link "https://github.com/necolas/normalize.css" "normalize.css" >}}@8.0.1
@@ -544,27 +590,26 @@ hugo
startLevel = 2
endLevel = 6
-# 作者信æ¯
+# 作者é…ç½®
[author]
name = "xxxx"
link = ""
-# 网站地图信æ¯
+# 网站地图é…ç½®
[sitemap]
changefreq = "weekly"
filename = "sitemap.xml"
priority = 0.5
-# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks ä¿¡æ¯" >}}
+# {{< link "https://gohugo.io/content-management/urls/#permalinks" "Permalinks é…ç½®" >}}
[Permalinks]
# posts = ":year/:month/:filename"
posts = ":filename"
-# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "éšç§ä¿¡æ¯è®¾ç½®" >}}
+# {{< link "https://gohugo.io/about/hugo-and-gdpr/" "éšç§ä¿¡æ¯é…ç½®" >}}
[privacy]
[privacy.googleAnalytics]
anonymizeIP = true
-
[privacy.youtube]
privacyEnhanced = true
diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md
index 600cbb8..1c82620 100644
--- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md
+++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.en.md
@@ -1,38 +1,19 @@
---
weight: 3
title: "Theme Documentation - Built-in Shortcodes"
-subtitle: ""
date: 2020-03-04T16:29:41+08:00
lastmod: 2020-03-04T16:29:41+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean."
-license: ""
tags: ["shortcodes"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
**Hugo** provides multiple built-in shortcodes for author convenience and to keep your markdown content clean.
@@ -48,7 +29,7 @@ A shortcode is a simple snippet that can generate reasonable HTML code and confo
Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your markdown content clean.
-## `figure` {#figure}
+## figure {#figure}
[Documentation of `figure`](https://gohugo.io/content-management/shortcodes/#figure)
@@ -73,7 +54,7 @@ The HTML looks like this:
</figure>
```
-## `gist`
+## gist
[Documentation of `gist`](https://gohugo.io/content-management/shortcodes/#gist)
@@ -93,7 +74,7 @@ The HTML looks like this:
<script type="application/javascript" src="https://gist.github.com/spf13/7896402.js"></script>
```
-## `highlight`
+## highlight
[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes/#instagram)
@@ -125,7 +106,7 @@ The rendered output looks like this:
</section>
{{< /highlight >}}
-## `instagram`
+## instagram
[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes/#instagram)
@@ -139,7 +120,7 @@ The rendered output looks like this:
{{< instagram BWNjjyYFxVx hidecaption >}}
-## `param`
+## param
[Documentation of `param`](https://gohugo.io/content-management/shortcodes/#param)
@@ -153,11 +134,11 @@ The rendered output looks like this:
{{< param description >}}
-## `ref` and `relref` {#ref-and-relref}
+## ref and relref {#ref-and-relref}
[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes/#ref-and-relref)
-## `tweet`
+## tweet
[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes/#tweet)
@@ -171,7 +152,7 @@ The rendered output looks like this:
{{< tweet 877500564405444608 >}}
-## `vimeo`
+## vimeo
[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes/#vimeo)
@@ -185,7 +166,7 @@ The rendered output looks like this:
{{< vimeo 146022717 >}}
-## `youtube`
+## youtube
[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes/#youtube)
diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md
index 36f3923..39a3308 100644
--- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md
+++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.fr.md
@@ -1,38 +1,19 @@
---
weight: 3
title: "Thème Documentation - Built-in Shortcodes"
-subtitle: ""
date: 2020-03-04T16:29:59+08:00
lastmod: 2020-03-04T16:29:59+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo fournit plusieurs shortcodes intégrés pour la commodité de l'auteur et pour garder votre contenu de démarque propre."
-license: ""
tags: ["shortcodes"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
**Hugo** fournit plusieurs shortcodes intégrés pour la commodité de l'auteur et pour garder votre contenu de démarque propre.
@@ -53,7 +34,7 @@ A shortcode is a simple snippet that can generate reasonable HTML code and confo
Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your markdown content clean.
-## `figure` {#figure}
+## figure {#figure}
[Documentation of `figure`](https://gohugo.io/content-management/shortcodes/#figure)
@@ -78,7 +59,7 @@ The HTML looks like this:
</figure>
```
-## `gist`
+## gist
[Documentation of `gist`](https://gohugo.io/content-management/shortcodes/#gist)
@@ -98,7 +79,7 @@ The HTML looks like this:
<script type="application/javascript" src="https://gist.github.com/spf13/7896402.js"></script>
```
-## `highlight`
+## highlight
[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes/#instagram)
@@ -130,7 +111,7 @@ The rendered output looks like this:
</section>
{{< /highlight >}}
-## `instagram`
+## instagram
[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes/#instagram)
@@ -144,7 +125,7 @@ The rendered output looks like this:
{{< instagram BWNjjyYFxVx hidecaption >}}
-## `param`
+## param
[Documentation of `param`](https://gohugo.io/content-management/shortcodes/#param)
@@ -158,11 +139,11 @@ The rendered output looks like this:
{{< param description >}}
-## `ref` and `relref` {#ref-and-relref}
+## ref and relref {#ref-and-relref}
[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes/#ref-and-relref)
-## `tweet`
+## tweet
[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes/#tweet)
@@ -176,7 +157,7 @@ The rendered output looks like this:
{{< tweet 877500564405444608 >}}
-## `vimeo`
+## vimeo
[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes/#vimeo)
@@ -190,7 +171,7 @@ The rendered output looks like this:
{{< vimeo 146022717 >}}
-## `youtube`
+## youtube
[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes/#youtube)
diff --git a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md
index 436e149..4582171 100644
--- a/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md
+++ b/exampleSite/content/posts/theme-documentation-built-in-shortcodes.zh-cn.md
@@ -1,38 +1,19 @@
---
weight: 3
title: "主题文档 - 内置 Shortcodes"
-subtitle: ""
date: 2020-03-04T16:29:59+08:00
lastmod: 2020-03-04T16:29:59+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo æ供了多个内置的 Shortcodes, 以方便作者ä¿æŒ Markdown 内容的整æ´."
-license: ""
tags: ["shortcodes"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
-featuredImagePreview: ""
-
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
**Hugo** æ供了多个内置的 Shortcodes, 以方便作者ä¿æŒ Markdown 内容的整æ´.
@@ -49,7 +30,7 @@ shortcode 是一个简å•ä»£ç æ®µ, å¯ä»¥ç”Ÿæˆåˆç†çš„ HTML 代ç , 并且符
Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš„用法.
æ供这些 shortcodes 是为了方便ä¿æŒä½ çš„ Markdown 内容简æ´.
-## `figure` {#figure}
+## figure {#figure}
[`figure` 的文档](https://gohugo.io/content-management/shortcodes/#figure)
@@ -74,7 +55,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
</figure>
```
-## `gist`
+## gist
[`gist` 的文档](https://gohugo.io/content-management/shortcodes/#gist)
@@ -94,7 +75,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
<script type="application/javascript" src="https://gist.github.com/spf13/7896402.js"></script>
```
-## `highlight`
+## highlight
[`highlight` 的文档](https://gohugo.io/content-management/shortcodes/#instagram)
@@ -126,7 +107,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
</section>
{{< /highlight >}}
-## `instagram`
+## instagram
[`instagram` 的文档](https://gohugo.io/content-management/shortcodes/#instagram)
@@ -140,7 +121,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
{{< instagram BWNjjyYFxVx hidecaption >}}
-## `param`
+## param
[`param` 的文档](https://gohugo.io/content-management/shortcodes/#param)
@@ -154,11 +135,11 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
{{< param description >}}
-## `ref` 和 `relref` {#ref-and-relref}
+## ref 和 relref {#ref-and-relref}
[`ref` 和 `relref` 的文档](https://gohugo.io/content-management/shortcodes/#ref-and-relref)
-## `tweet`
+## tweet
[`tweet` 的文档](https://gohugo.io/content-management/shortcodes/#tweet)
@@ -172,7 +153,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
{{< tweet 877500564405444608 >}}
-## `vimeo`
+## vimeo
[`vimeo` 的文档](https://gohugo.io/content-management/shortcodes/#vimeo)
@@ -186,7 +167,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些éžå¸¸å¸¸è§çš
{{< vimeo 146022717 >}}
-## `youtube`
+## youtube
[`youtube` 的文档](https://gohugo.io/content-management/shortcodes/#youtube)
diff --git a/exampleSite/content/posts/theme-documentation-content.en.md b/exampleSite/content/posts/theme-documentation-content.en.md
index 24212a9..5ba6d37 100644
--- a/exampleSite/content/posts/theme-documentation-content.en.md
+++ b/exampleSite/content/posts/theme-documentation-content.en.md
@@ -1,38 +1,23 @@
---
weight: 2
title: "Theme Documentation - Content"
-subtitle: ""
date: 2020-03-05T15:58:26+08:00
lastmod: 2020-03-05T15:58:26+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Find out how to create and organize your content quickly and intuitively in LoveIt theme."
-license: ""
tags: ["content", "markdown"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-content/featured-image.jpg"
-featuredImagePreview: ""
-toc: true
-autoCollapseToc: false
-math: true
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
-lightgallery: true
-linkToMarkdown: true
-share:
+toc:
+ auto: false
+math:
enable: true
-comment: true
+lightgallery: true
---
Find out how to create and organize your content quickly and intuitively in **LoveIt** theme.
@@ -51,7 +36,12 @@ A few suggestions to help you get a good looking site quickly:
**Hugo** allows you to add front matter in `yaml`, `toml` or `json` to your content files.
-Here is a default front matter from the default archetype:
+{{< admonition >}}
+**Not all** of the below front matters need to be set in each of your posts.
+It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent.
+{{< /admonition >}}
+
+Here is a front matter example:
```yaml
---
@@ -67,28 +57,33 @@ license: ""
tags: []
categories: []
-hiddenFromHomePage: false
-hiddenFromSearch: false
-
featuredImage: ""
featuredImagePreview: ""
-toc: false
-autoCollapseToc: true
-math: true
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+hiddenFromHomePage: false
+hiddenFromSearch: false
lightgallery: true
+copyCode: true
+ruby: true
+fraction: true
+fontawesome: true
linkToMarkdown: true
+
+toc:
+ enable: true
+ auto: true
+math:
+ enable: true
+ # ...
+mapbox:
+ accessToken: ""
+ # ...
share:
enable: true
-comment: true
+ # ...
+comment:
+ enable: true
+ # ...
---
```
@@ -101,24 +96,26 @@ comment: true
* **authorLink**: the link of the author.
* **description**: the description for the content.
* **license**: the special lisence for this content.
+
* **tags**: the tags for the content.
* **categories**: the categories for the content.
-* **hiddenFromHomePage**: if `true`, the content will not be shown in the home page, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration).
-* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results.
* **featuredImage**: the featured image for the content.
* **featuredImagePreview**: the featured image for the content preview in the home page.
-* **toc**: if `true`, the content will show the table of the contents.
-* **autoCollapseToc**: if `true`, the table of the contents will be automatically collapsed.
-* **math**: if `true`, the mathematical formula in the content will be automatically rendered.
-* **mapbox**: {{< version 0.2.0 >}} the same as `params.mapbox` in the [site configuration](../theme-documentation-basics/#site-configuration).
+
+* **hiddenFromHomePage**: if `true`, the content will not be shown in the home page.
+* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results.
+* **copyCode**: {{< version 0.2.0 >}} if `true`, the content will show the copy button of the code block.
* **lightgallery**: if `true`, images in the content will be shown as the gallery.
+* **ruby**: {{< version 0.2.0 >}} if `true`, the content will enable the [ruby extended syntax](#ruby).
+* **fraction**: {{< version 0.2.0 >}} if `true`, the content will enable the [fraction extended syntax](#fraction).
+* **fontawesome**: {{< version 0.2.0 >}} if `true`, the content will enable the [Font Awesome extended syntax](#fontawesome).
* **linkToMarkdown**: if `true`, the footer of the content will show the link to the orignal Markdown file.
-* **share**: the same as `params.share` in the [site configuration](../theme-documentation-basics/#site-configuration).
-* **comment**: if `true`, the comment will be used.
-{{< admonition tip >}}
-Not all of the above front matters need to be set in each of your posts. It is necessary only if the front matters and your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent.
-{{< /admonition >}}
+* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics/#site-configuration).
## 3 Content Summaries
@@ -252,7 +249,7 @@ $$ \ce{CO2 + C -> 2 CO} $$
$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$
-### Ruby Annotation
+### Ruby Annotation {#ruby}
An extended Markdown syntax for **ruby annotation** is supported in **LoveIt** theme:
@@ -264,7 +261,7 @@ The rendered output looks like this:
[Hugo]^(An open-source static site generator)
-### Fraction
+### Fraction {#fraction}
{{< version 0.2.0 >}}
@@ -282,7 +279,7 @@ The rendered output looks like this:
[90]/[100]
-### Font Awesome
+### Font Awesome {#fontawesome}
**LoveIt** theme uses [Font Awesome](https://fontawesome.com/) as the icon library.
You can easily use these icons in your articles.
diff --git a/exampleSite/content/posts/theme-documentation-content.fr.md b/exampleSite/content/posts/theme-documentation-content.fr.md
index 4d94f4a..ad079ef 100644
--- a/exampleSite/content/posts/theme-documentation-content.fr.md
+++ b/exampleSite/content/posts/theme-documentation-content.fr.md
@@ -1,38 +1,23 @@
---
weight: 2
title: "Thème Documentation - Contenu"
-subtitle: ""
date: 2020-03-05T16:30:05+08:00
lastmod: 2020-03-05T16:30:05+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème LoveIt."
-license: ""
tags: ["contenu", "markdown"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-content/featured-image.jpg"
-featuredImagePreview: ""
-toc: true
-autoCollapseToc: false
-math: true
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
-lightgallery: true
-linkToMarkdown: true
-share:
+toc:
+ auto: false
+math:
enable: true
-comment: true
+lightgallery: true
---
Découvrez comment créer et organiser votre contenu rapidement et intuitivement dans le thème **LoveIt**.
@@ -56,7 +41,12 @@ A few suggestions to help you get a good looking site quickly:
**Hugo** allows you to add front matter in `yaml`, `toml` or `json` to your content files.
-Here is a default front matter from the default archetype:
+{{< admonition >}}
+**Not all** of the below front matters need to be set in each of your posts.
+It is necessary only if the front matters and the `page` part in your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent.
+{{< /admonition >}}
+
+Here is a front matter example:
```yaml
---
@@ -72,28 +62,33 @@ license: ""
tags: []
categories: []
-hiddenFromHomePage: false
-hiddenFromSearch: false
-
featuredImage: ""
featuredImagePreview: ""
-toc: false
-autoCollapseToc: true
-math: true
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+hiddenFromHomePage: false
+hiddenFromSearch: false
lightgallery: true
+copyCode: true
+ruby: true
+fraction: true
+fontawesome: true
linkToMarkdown: true
+
+toc:
+ enable: true
+ auto: true
+math:
+ enable: true
+ # ...
+mapbox:
+ accessToken: ""
+ # ...
share:
enable: true
-comment: true
+ # ...
+comment:
+ enable: true
+ # ...
---
```
@@ -106,24 +101,26 @@ comment: true
* **authorLink**: the link of the author.
* **description**: the description for the content.
* **license**: the special lisence for this content.
+
* **tags**: the tags for the content.
* **categories**: the categories for the content.
-* **hiddenFromHomePage**: if `true`, the content will not be shown in the home page, but this behaviour is configurabl in the [site configuration](../theme-documentation-basics/#site-configuration).
-* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results.
* **featuredImage**: the featured image for the content.
* **featuredImagePreview**: the featured image for the content preview in the home page.
-* **toc**: if `true`, the content will show the table of the contents.
-* **autoCollapseToc**: if `true`, the table of the contents will be automatically collapsed.
-* **math**: if `true`, the mathematical formula in the content will be automatically rendered.
-* **mapbox**: {{< version 0.2.0 >}} the same as `params.mapbox` in the [site configuration](../theme-documentation-basics/#site-configuration).
+
+* **hiddenFromHomePage**: if `true`, the content will not be shown in the home page.
+* **hiddenFromSearch**: {{< version 0.2.0 >}} if `true`, the content will not be shown in the search results.
+* **copyCode**: {{< version 0.2.0 >}} if `true`, the content will show the copy button of the code block.
* **lightgallery**: if `true`, images in the content will be shown as the gallery.
+* **ruby**: {{< version 0.2.0 >}} if `true`, the content will enable the [ruby extended syntax](#ruby).
+* **fraction**: {{< version 0.2.0 >}} if `true`, the content will enable the [fraction extended syntax](#fraction).
+* **fontawesome**: {{< version 0.2.0 >}} if `true`, the content will enable the [Font Awesome extended syntax](#fontawesome).
* **linkToMarkdown**: if `true`, the footer of the content will show the link to the orignal Markdown file.
-* **share**: the same as `params.share` in the [site configuration](../theme-documentation-basics/#site-configuration).
-* **comment**: if `true`, the comment will be used.
-{{< admonition tip >}}
-Not all of the above front matters need to be set in each of your posts. It is necessary only if the front matters and your [site configuration](../theme-documentation-basics/#site-configuration) are inconsistent.
-{{< /admonition >}}
+* **toc**: {{< version 0.2.0 changed >}} the same as the `params.page.toc` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **math**: {{< version 0.2.0 changed >}} the same as the `params.page.math` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **mapbox**: {{< version 0.2.0 >}} the same as the `params.page.mapbox` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **share**: the same as the `params.page.share` part in the [site configuration](../theme-documentation-basics/#site-configuration).
+* **comment**: {{< version 0.2.0 changed >}} the same as the `params.page.comment` part in the [site configuration](../theme-documentation-basics/#site-configuration).
## 3 Content Summaries
@@ -257,7 +254,7 @@ $$ \ce{CO2 + C -> 2 CO} $$
$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$
-### Ruby Annotation
+### Ruby Annotation {#ruby}
An extended Markdown syntax for **ruby annotation** is supported in **LoveIt** theme:
@@ -269,7 +266,7 @@ The rendered output looks like this:
[Hugo]^(An open-source static site generator)
-### Fraction
+### Fraction {#fraction}
{{< version 0.2.0 >}}
@@ -287,7 +284,7 @@ The rendered output looks like this:
[90]/[100]
-### Font Awesome
+### Font Awesome {#fontawesome}
**LoveIt** theme uses [Font Awesome](https://fontawesome.com/) as the icon library.
You can easily use these icons in your articles.
diff --git a/exampleSite/content/posts/theme-documentation-content.zh-cn.md b/exampleSite/content/posts/theme-documentation-content.zh-cn.md
index 7fcb812..1b25c00 100644
--- a/exampleSite/content/posts/theme-documentation-content.zh-cn.md
+++ b/exampleSite/content/posts/theme-documentation-content.zh-cn.md
@@ -7,26 +7,17 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "了解如何在 LoveIt 主题中快速, 直观地创建和组织内容."
-license: ""
tags: ["内容", "markdown"]
categories: ["documentation"]
featuredImage: "/images/theme-documentation-content/featured-image.jpg"
-toc: true
-autoCollapseToc: false
-math: true
-mapbox:
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
-lightgallery: true
-linkToMarkdown: true
-share:
+toc:
+ auto: false
+math:
enable: true
-comment: true
+lightgallery: true
---
了解如何在 **LoveIt** 主题中快速, 直观地创建和组织内容.
@@ -45,7 +36,12 @@ comment: true
**Hugo** å…许你在文章内容å‰é¢æ·»åŠ  `yaml`, `toml` 或者 `json` æ ¼å¼çš„å‰ç½®å‚æ•°.
-这是默认文章模æ¿ä¸­çš„默认å‰ç½®å‚æ•°:
+{{< admonition >}}
+**ä¸æ˜¯æ‰€æœ‰**的上述å‰ç½®å‚数都必须在你的æ¯ç¯‡æ–‡ç« ä¸­è®¾ç½®.
+åªæœ‰åœ¨æ–‡ç« çš„å‚数和你的 [网站设置](../theme-documentation-basics/#site-configuration) 中的 `page` 部分ä¸ä¸€è‡´æ—¶æ‰æœ‰å¿…è¦è¿™ä¹ˆåš.
+{{< /admonition >}}
+
+这是一个å‰ç½®å‚数例å­:
```yaml
---
@@ -61,28 +57,33 @@ license: ""
tags: []
categories: []
-hiddenFromHomePage: false
-hiddenFromSearch: false
-
featuredImage: ""
featuredImagePreview: ""
-toc: false
-autoCollapseToc: true
-math: true
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
+hiddenFromHomePage: false
+hiddenFromSearch: false
lightgallery: true
+copyCode: true
+ruby: true
+fraction: true
+fontawesome: true
linkToMarkdown: true
+
+toc:
+ enable: true
+ auto: true
+math:
+ enable: true
+ # ...
+mapbox:
+ accessToken: ""
+ # ...
share:
enable: true
-comment: true
+ # ...
+comment:
+ enable: true
+ # ...
---
```
@@ -95,25 +96,26 @@ comment: true
* **authorLink**: 文章作者的链接.
* **description**: 文章内容的æè¿°.
* **license**: 这篇文章特殊的许å¯.
+
* **tags**: 文章的标签.
* **categories**: 文章所属的类别.
-* **hiddenFromHomePage**: 如果设为 `true`, 这篇文章将ä¸ä¼šæ˜¾ç¤ºåœ¨ä¸»é¡µä¸Š, 但是此行为å¯ä»¥åœ¨ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中设置的.
-* **hiddenFromSearch**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章将ä¸ä¼šæ˜¾ç¤ºåœ¨æœç´¢ç»“果中.
* **featuredImage**: 文章的特色图片.
* **featuredImagePreview**: 用在主页预览的文章特色图片.
-* **toc**: 如果设为 `true`, 这篇文章会显示å³ä¾§ç›®å½•.
-* **autoCollapseToc**: 如果设为 `true`, 文章目录会自动折å .
-* **math**: 如果设为 `true`, 将自动渲染文章中的数学公å¼.
-* **mapbox**: {{< version 0.2.0 >}} å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.mapbox` 对象相åŒ.
+
+* **hiddenFromHomePage**: 如果设为 `true`, 这篇文章将ä¸ä¼šæ˜¾ç¤ºåœ¨ä¸»é¡µä¸Š.
+* **hiddenFromSearch**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章将ä¸ä¼šæ˜¾ç¤ºåœ¨æœç´¢ç»“果中.
+* **copyCode**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会显示代ç å—çš„å¤åˆ¶æŒ‰é’®.
* **lightgallery**: 如果设为 `true`, 文章中的图片将å¯ä»¥æŒ‰ç…§ç”»å»Šå½¢å¼å‘ˆçŽ°.
+* **ruby**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [上标注释扩展语法](#ruby).
+* **fraction**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [分数扩展语法](#fraction).
+* **fontawesome**: {{< version 0.2.0 >}} 如果设为 `true`, 这篇文章会使用 [Font Awesome 扩展语法](#fontawesome).
* **linkToMarkdown**: 如果设为 `true`, 内容的页脚将显示指å‘原始 Markdown 文件的链接.
-* **share**: å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.share` 对象相åŒ.
-* **comment**: 如果设为 `true`, å°†å¯ç”¨è¯„论系统.
-{{< admonition tip >}}
-ä¸æ˜¯æ‰€æœ‰çš„上述å‰ç½®å‚数都必须在你的æ¯ç¯‡æ–‡ç« ä¸­è®¾ç½®.
-åªæœ‰åœ¨æ–‡ç« çš„å‚数和你的 [网站设置](../theme-documentation-basics/#site-configuration) ä¸ä¸€è‡´æ—¶æ‰æœ‰å¿…è¦è¿™ä¹ˆåš.
-{{< /admonition >}}
+* **toc**: {{< version 0.2.0 changed >}} å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.page.toc` 部分相åŒ.
+* **math**: {{< version 0.2.0 changed >}} å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.page.math` 部分相åŒ.
+* **mapbox**: {{< version 0.2.0 >}} å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.page.mapbox` 部分相åŒ.
+* **share**: å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.page.share` 部分相åŒ.
+* **comment**: {{< version 0.2.0 changed >}} å’Œ [网站é…ç½®](../theme-documentation-basics/#site-configuration) 中的 `params.page.comment` 部分相åŒ.
## 3 内容摘è¦
@@ -247,7 +249,7 @@ $$ \ce{CO2 + C -> 2 CO} $$
$$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$
-### 字符注音或者注释
+### 字符注音或者注释 {#ruby}
**LoveIt** 主题支æŒä¸€ç§ **字符注音或者注释** Markdown 扩展语法:
@@ -259,7 +261,7 @@ $$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$
[Hugo]^(一个开æºçš„é™æ€ç½‘站生æˆå·¥å…·)
-### 分数
+### 分数 {#fraction}
{{< version 0.2.0 >}}
@@ -277,7 +279,7 @@ $$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$
[90]/[100]
-### Font Awesome
+### Font Awesome {#fontawesome}
**LoveIt** 主题使用 [Font Awesome](https://fontawesome.com/) 作为图标库.
ä½ åŒæ ·å¯ä»¥åœ¨æ–‡ç« ä¸­è½»æ¾ä½¿ç”¨è¿™äº›å›¾æ ‡.
diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md
index 103aa69..732163a 100644
--- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md
+++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.en.md
@@ -1,45 +1,27 @@
---
weight: 4
title: "Theme Documentation - Extended Shortcodes"
-subtitle: ""
date: 2020-03-03T16:29:41+08:00
lastmod: 2020-03-03T16:29:41+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "LoveIt theme provides multiple shortcodes on top of built-in ones in Hugo."
-license: ""
tags: ["shortcodes"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
**LoveIt** theme provides multiple shortcodes on top of built-in ones in Hugo.
<!--more-->
-## `style`
+## style
`style` is a shortcode to insert custom style in your post.
@@ -63,7 +45,7 @@ The rendered output looks like this:
This is a right-aligned paragraph.
{{< /style >}}
-## `link`
+## link
{{< version 0.2.0 >}}
@@ -127,7 +109,7 @@ The rendered output looks like this (hover over the link, there should be a tool
{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}}
-## `image`
+## image
{{< version 0.2.0 changed >}}
@@ -197,7 +179,7 @@ The rendered output looks like this:
{{< image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" >}}
-## `admonition`
+## admonition
The `admonition` shortcode supports **12** types of banners to help you put notice in your page.
@@ -283,7 +265,7 @@ The rendered output looks like this:
A **tip** banner
{{< /admonition >}}
-## `mermaid`
+## mermaid
[mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
@@ -531,7 +513,7 @@ pie
"Rats" : 15
{{< /mermaid >}}
-## `echarts`
+## echarts
[ECharts](https://echarts.apache.org/) is a library helping you to generate interactive data visualization.
@@ -919,7 +901,7 @@ The `echarts` shortcode has also the following named parameters:
{{< version 0.2.0 >}} Height of the data visualization, default value is `30rem`.
-## `mapbox`
+## mapbox
{{< version 0.2.0 >}}
@@ -993,7 +975,7 @@ The rendered output looks like this:
{{< mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/navigation-preview-day-v4?optimize=true" "mapbox://styles/mapbox/navigation-preview-night-v4?optimize=true" >}}
-## `music`
+## music
The `music` shortcode embeds a responsive music player based on [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS).
@@ -1132,7 +1114,7 @@ The `music` shortcode has the following named parameters only applying to the ty
Max height of the music list, default value is `340px`.
-## `bilibili`
+## bilibili
{{< version 0.2.0 changed >}}
@@ -1175,7 +1157,7 @@ The rendered output looks like this:
{{< bilibili id=BV1TJ411C7An p=3 >}}
-## `typeit`
+## typeit
The `typeit` shortcode provides typing animation based on [TypeIt](https://typeitjs.com/).
diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md
index 057ca83..502c60d 100644
--- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md
+++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.fr.md
@@ -1,38 +1,20 @@
---
weight: 4
title: "Thème Documentation - Extended Shortcodes"
-subtitle: ""
date: 2020-03-03T16:29:59+08:00
lastmod: 2020-03-03T16:29:59+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Le thème LoveIt fournit plusieurs shortcodes en plus de ceux intégrés dans Hugo."
-license: ""
tags: ["shortcodes"]
categories: ["documentation"]
-hiddenFromHomePage: false
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"
-toc: true
-autoCollapseToc: true
-math: false
-mapbox:
- accessToken: ""
- lightStyle: ""
- darkStyle: ""
- navigation: true
- geolocate: true
- scale: true
- fullscreen: true
lightgallery: true
-linkToMarkdown: true
-share:
- enable: true
-comment: true
---
Le thème **LoveIt** fournit plusieurs shortcodes en plus de ceux intégrés dans Hugo.
@@ -44,7 +26,7 @@ Sorry, this article has not been completely translated into **French**.
Welcome to take the time to propose a translation by [making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme!
{{< /admonition >}}
-## `style`
+## style
`style` is a shortcode to insert custom style in your post.
@@ -68,7 +50,7 @@ The rendered output looks like this:
This is a right-aligned paragraph.
{{< /style >}}
-## `link`
+## link
{{< version 0.2.0 >}}
@@ -132,7 +114,7 @@ The rendered output looks like this (hover over the link, there should be a tool
{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}}
-## `image`
+## image
{{< version 0.2.0 changed >}}
@@ -202,7 +184,7 @@ The rendered output looks like this:
{{< image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" >}}
-## `admonition`
+## admonition
The `admonition` shortcode supports **12** types of banners to help you put notice in your page.
@@ -288,7 +270,7 @@ The rendered output looks like this:
A **tip** banner
{{< /admonition >}}
-## `mermaid`
+## mermaid
[mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
@@ -536,7 +518,7 @@ pie
"Rats" : 15
{{< /mermaid >}}
-## `echarts`
+## echarts
[ECharts](https://echarts.apache.org/) is a library helping you to generate interactive data visualization.
@@ -924,7 +906,7 @@ The `echarts` shortcode has also the following named parameters:
{{< version 0.2.0 >}} Height of the data visualization, default value is `30rem`.
-## `mapbox`
+## mapbox
{{< version 0.2.0 >}}
@@ -998,7 +980,7 @@ The rendered output looks like this:
{{< mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/navigation-preview-day-v4?optimize=true" "mapbox://styles/mapbox/navigation-preview-night-v4?optimize=true" >}}
-## `music`
+## music
The `music` shortcode embeds a responsive music player based on [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS).
@@ -1137,7 +1119,7 @@ The `music` shortcode has the following named parameters only applying to the ty
Max height of the music list, default value is `340px`.
-## `bilibili`
+## bilibili
{{< version 0.2.0 changed >}}
@@ -1180,7 +1162,7 @@ The rendered output looks like this:
{{< bilibili id=BV1TJ411C7An p=3 >}}
-## `typeit`
+## typeit
The `typeit` shortcode provides typing animation based on [TypeIt](https://typeitjs.com/).
diff --git a/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md b/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md
index 1d68fc1..974d72b 100644
--- a/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md
+++ b/exampleSite/content/posts/theme-documentation-extended-shortcodes.zh-cn.md
@@ -1,14 +1,12 @@
---
weight: 4
title: "主题文档 - 扩展 Shortcodes"
-subtitle: ""
date: 2020-03-03T16:29:59+08:00
lastmod: 2020-03-03T16:29:59+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "LoveIt 主题在 Hugo 内置的 shortcode 的基础上æ供多个扩展的 shortcode."
-license: ""
tags: ["shortcodes"]
categories: ["documentation"]
@@ -16,16 +14,14 @@ categories: ["documentation"]
featuredImage: "/images/theme-documentation-extended-shortcodes/featured-image.jpg"
featuredImagePreview: "/images/theme-documentation-extended-shortcodes/featured-image-preview.jpg"
-toc: true
-autoCollapseToc: true
-math: false
+lightgallery: true
---
**LoveIt** 主题在 Hugo 内置的 shortcode 的基础上æ供多个扩展的 shortcode.
<!--more-->
-## `style`
+## style
`style` shortcode 用æ¥åœ¨ä½ çš„文章中æ’入自定义样å¼.
@@ -49,7 +45,7 @@ This is a right-aligned paragraph.
This is a right-aligned paragraph.
{{< /style >}}
-## `link`
+## link
{{< version 0.2.0 >}}
@@ -114,7 +110,7 @@ This is a right-aligned paragraph.
{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}}
-## `image`
+## image
{{< version 0.2.0 changed >}}
@@ -184,7 +180,7 @@ This is a right-aligned paragraph.
{{< image src="/images/theme-documentation-extended-shortcodes/lighthouse.jpg" caption="Lighthouse (`image`)" src-s="/images/theme-documentation-extended-shortcodes/lighthouse-small.jpg" src-l="/images/theme-documentation-extended-shortcodes/lighthouse-large.jpg" >}}
-## `admonition`
+## admonition
`admonition` shortcode æ”¯æŒ **12** ç§ å¸®åŠ©ä½ åœ¨é¡µé¢ä¸­æ’å…¥æ示的横幅.
@@ -270,7 +266,7 @@ This is a right-aligned paragraph.
一个 **技巧** 横幅
{{< /admonition >}}
-## `mermaid`
+## mermaid
[mermaid](https://mermaidjs.github.io/) 是一个å¯ä»¥å¸®åŠ©ä½ åœ¨æ–‡ç« ä¸­ç”Ÿæˆå›¾è¡¨å’Œæµç¨‹å›¾çš„库, 类似 Markdown 的语法.
@@ -518,7 +514,7 @@ pie
"Rats" : 15
{{< /mermaid >}}
-## `echarts`
+## echarts
[ECharts](https://echarts.apache.org/) 是一个帮助你生æˆäº¤äº’å¼æ•°æ®å¯è§†åŒ–的库.
@@ -906,7 +902,7 @@ data = [
{{< version 0.2.0 >}} æ•°æ®å¯è§†åŒ–的高度, 默认值是 `30rem`.
-## `mapbox`
+## mapbox
{{< version 0.2.0 >}}
@@ -980,7 +976,7 @@ data = [
{{< mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/navigation-preview-day-v4?optimize=true" "mapbox://styles/mapbox/navigation-preview-night-v4?optimize=true" >}}
-## `music`
+## music
`music` shortcode 基于 [APlayer](https://github.com/MoePlayer/APlayer) å’Œ [MetingJS](https://github.com/metowolf/MetingJS) æ供了一个内嵌的å“应å¼éŸ³ä¹æ’­æ”¾å™¨.
@@ -1118,7 +1114,7 @@ data = [
音ä¹åˆ—表的最大高度, 默认值是 `340px`.
-## `bilibili`
+## bilibili
{{< version 0.2.0 changed >}}
@@ -1160,7 +1156,7 @@ https://www.bilibili.com/video/BV1TJ411C7An?p=3
{{< bilibili id=BV1TJ411C7An p=3 >}}
-## `typeit`
+## typeit
`typeit` shortcode 基于 [TypeIt](https://typeitjs.com/) æ供了打字动画.
diff --git a/i18n/en.toml b/i18n/en.toml
index d914214..8466336 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -52,6 +52,17 @@ other = "Powered by %s"
other = "Theme"
# === partials/footer.html ===
+# === partials/comment.html ===
+[valineLang]
+other = "en"
+
+[valinePlaceholder]
+other = "Your comment ..."
+
+[facebookLanguageCode]
+other = "en_US"
+# === partials/comment.html ===
+
# === partials/assets.html ===
[search]
other = "Search"
diff --git a/i18n/fr.toml b/i18n/fr.toml
index bde9a11..694bad8 100644
--- a/i18n/fr.toml
+++ b/i18n/fr.toml
@@ -52,6 +52,17 @@ other = "Propulsé par %s"
other = "Thème"
# === partials/footer.html ===
+# === partials/comment.html ===
+[valineLang]
+other = "en"
+
+[valinePlaceholder]
+other = "Votre commentaire ..."
+
+[facebookLanguageCode]
+other = "fr"
+# === partials/comment.html ===
+
# === partials/assets.html ===
[search]
other = "Chercher"
diff --git a/i18n/pl.toml b/i18n/pl.toml
index 1b7f52e..2605259 100644
--- a/i18n/pl.toml
+++ b/i18n/pl.toml
@@ -52,6 +52,17 @@ other = "Napędzany przez %s"
other = "Szablon"
# === partials/footer.html ===
+# === partials/comment.html ===
+[valineLang]
+other = "en"
+
+[valinePlaceholder]
+other = "Twój komentarz ..."
+
+[facebookLanguageCode]
+other = "pl"
+# === partials/comment.html ===
+
# === partials/assets.html ===
[search]
other = "Szukaj"
diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml
index fa46c06..04092b8 100644
--- a/i18n/zh-CN.toml
+++ b/i18n/zh-CN.toml
@@ -52,6 +52,17 @@ other = "由 %s 强力驱动"
other = "主题"
# === partials/footer.html ===
+# === partials/comment.html ===
+[valineLang]
+other = "zh-cn"
+
+[valinePlaceholder]
+other = "你的评论 ..."
+
+[facebookLanguageCode]
+other = "zh_CN"
+# === partials/comment.html ===
+
# === partials/assets.html ===
[search]
other = "æœç´¢"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index fb97d56..0862dfc 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,20 +1,26 @@
-{{- $scratch := newScratch -}}
-{{- .Scratch.Set "scratch" $scratch -}}
-{{- if eq hugo.Environment "production" -}}
- {{- $scratch.Set "CDN" .Site.Params.cdn -}}
- {{- $scratch.Set "fingerprint" .Site.Params.fingerprint -}}
-{{- end -}}
-
-{{- $scratch.Set "major-version" "0.2.X" -}}
-{{- $scratch.Set "version" "0.2.0" -}}
+{{- $version := "0.2.X" -}}
{{- /* LoveIt theme version detection */ -}}
{{- if not .Site.Params.version -}}
{{- errorf "\n\nYou haven't configured the LoveIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration \n你还没有正确é…ç½® LoveIt 的版本å‚æ•° å‚考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration \n" -}}
-{{- else if ne .Site.Params.version ($scratch.Get "major-version") -}}
- {{- errorf (printf "\n\n%s -> %s:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases \n你进行了一次ä¸å…¼å®¹çš„æ›´æ–° å‚考 https://github.com/dillonzq/LoveIt/releases \n" .Site.Params.version ($scratch.Get "major-version")) -}}
+{{- else if ne .Site.Params.version $version -}}
+ {{- errorf (printf "\n\n%s -> %s:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases \n你进行了一次ä¸å…¼å®¹çš„æ›´æ–° å‚考 https://github.com/dillonzq/LoveIt/releases \n" .Site.Params.version $version) -}}
+{{- end -}}
+
+{{- $params := .Params | merge .Site.Params.page -}}
+{{- .Scratch.Set "version" "0.2.0" -}}
+
+{{- if eq hugo.Environment "production" -}}
+ {{- .Scratch.Set "cdn" .Site.Params.cdn -}}
+ {{- .Scratch.Set "fingerprint" .Site.Params.fingerprint -}}
+{{- else -}}
+ {{- $params = dict "comment" nil | merge $params -}}
{{- end -}}
+{{- .Scratch.Set "params" $params -}}
+{{- $this := dict "desktop" .Site.Params.header.desktopMode "mobile" .Site.Params.header.mobileMode | dict "headerMode" | dict "config" -}}
+{{- .Scratch.Set "this" $this -}}
+
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
@@ -25,7 +31,7 @@
<title>
{{- block "title" . }}{{ .Site.Title }}{{ end -}}
</title>
- <meta name="Description" content="{{ .Params.description | default .Site.Params.description }}">
+ <meta name="Description" content="{{ $params.description | default .Site.Params.description }}">
{{- partial "head/meta.html" . -}}
{{- partial "head/link.html" . -}}
@@ -33,8 +39,8 @@
</head>
<body>
{{- /* Check theme isDark before body rendering */ -}}
- {{- $theme := .Site.Params.defaultTheme -}}
- <script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ .Site.Params.defaultTheme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ .Site.Params.defaultTheme }}' === 'dark')) && document.body.classList.add('dark');</script>
+ {{- $theme := .Site.Params.defaulttheme -}}
+ <script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ $theme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ $theme }}' === 'dark')) && document.body.classList.add('dark');</script>
<div id="mask"></div>
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index 415314b..2d037bc 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -10,7 +10,8 @@
</h2>
{{- /* Paginate */ -}}
- {{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
+ {{- $pages := .Pages.GroupByDate "2006" -}}
+ {{- range (.Site.Params.section.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}}
<h3>{{ .Key }}</h3>
{{- range .Pages -}}
<article class="archive-item">
@@ -18,7 +19,7 @@
{{- .Title -}}
</a>
<span class="archive-item-date">
- {{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
+ {{- .Date.Format ($.Site.Params.section.dateFormat | default "01-02") -}}
</span>
</article>
{{- end -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 4f19da8..cf0815a 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,18 +1,21 @@
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
{{- define "content" -}}
+ {{- $params := .Scratch.Get "params" -}}
<div class="page single special">
{{- /* Title */ -}}
<h1 class="single-title animated pulse faster">
{{- .Title -}}
</h1>
- {{- with .Params.subtitle -}}
+
+ {{- /* Subtitle */ -}}
+ {{- with $params.subtitle -}}
<h2 class="single-subtitle">{{ . }}</h2>
{{- end -}}
{{- /* Content */ -}}
<div class="content" id="content">
- {{- partial "function/content.html" .Content | safeHTML -}}
+ {{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
</div>
{{- end -}}
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index df7ef02..c8a33a6 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -1,10 +1,9 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-
+{{- $params := .Params | merge .Site.Params.page -}}
<article class="single summary" itemscope itemtype="http://schema.org/Article">
{{- /* Featured image */ -}}
- {{- with .Params.featuredImage -}}
+ {{- with $params.featuredimage -}}
<div class="featured-image-preview">
- {{- $image := $.Params.featuredImagePreview | default . -}}
+ {{- $image := $params.featuredimagepreview | default . -}}
{{- partial "plugin/image.html" (dict "src" $image "alt" $.Description "large" true) -}}
</div>
{{- end -}}
@@ -16,19 +15,19 @@
{{- /* Meta */ -}}
<div class="post-meta">
- {{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
- {{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
+ {{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
+ {{- $authorLink := $params.authorlink | default .Site.Author.link | default (relLangURL "/") -}}
<span class="post-author">
{{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
{{- partial "plugin/link.html" $options -}}
</span>
- {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
+ {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormat | default "2006-01-02") -}}
&nbsp;<span class="post-publish">
{{ T "publish" }}&nbsp;<time datetime={{ $publish_date }}>{{ $publish_date }}</time>
</span>
- {{- with .Params.categories -}}
+ {{- with $params.categories -}}
&nbsp;
<span class="post-category">
{{- T "included" -}}
@@ -45,7 +44,7 @@
{{- /* Summary content */ -}}
<div class="content">
{{- with .Summary -}}
- {{- partial "function/content.html" . | safeHTML -}}
+ {{- dict "content" . "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- else -}}
{{- .Description | safeHTML -}}
{{- end -}}
@@ -54,7 +53,7 @@
{{- /* Footer */ -}}
<div class="post-footer">
<a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
- {{- with .Params.tags -}}
+ {{- with $params.tags -}}
<div class="post-tags">
<i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}}
diff --git a/layouts/index.html b/layouts/index.html
index 5fad69f..96dd11c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,25 +1,21 @@
{{- define "content" -}}
<div class="page home">
{{- /* Profile */ -}}
- {{- if .Site.Params.home.profile.enable -}}
+ {{- if ne .Site.Params.home.profile.enable false -}}
{{- partial "home/profile.html" . -}}
{{- end -}}
{{- /* Posts */ -}}
{{- if ne .Site.Params.home.posts.enable false -}}
{{- /* Paginate */ -}}
- {{- $paginator := where .Site.RegularPages "Type" "posts" -}}
- {{- if ne .Site.Params.home.posts.mode.defaultHiddenFromHomePage false -}}
- {{- $paginator = where $paginator "Params.hiddenfromhomepage" "!=" true -}}
+ {{- $pages := where .Site.RegularPages "Type" "posts" -}}
+ {{- if .Site.Params.page.hiddenFromHomePage -}}
+ {{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
{{- else -}}
- {{- $paginator = where $paginator "Params.hiddenfromhomepage" false -}}
+ {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
{{- end -}}
- {{- with .Site.Params.home.posts.paginate -}}
- {{- $paginator = $.Paginate $paginator . -}}
- {{- else -}}
- {{- $paginator = $.Paginate $paginator -}}
- {{- end -}}
- {{- range $paginator.Pages -}}
+ {{- $pages = .Site.Params.home.posts.paginate | default .Site.Params.paginate | .Paginate $pages -}}
+ {{- range $pages.Pages -}}
{{- .Render "summary" -}}
{{- end -}}
{{- partial "paginator.html" . -}}
diff --git a/layouts/index.json b/layouts/index.json
index dc052dc..bbddbd3 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -1,11 +1,18 @@
{{- $index := slice -}}
-{{- range where .Site.RegularPages ".Params.hiddenfromsearch" "!=" true -}}
+{{- $pages := .Site.RegularPages -}}
+{{- if .Site.Params.page.hiddenFromSearch -}}
+ {{- $pages = where $pages "Params.hiddenfromsearch" false -}}
+{{- else -}}
+ {{- $pages = where $pages "Params.hiddenfromsearch" "!=" true -}}
+{{- end -}}
+{{- range $pages -}}
+ {{- $params := .Params | merge $.Site.Params.page -}}
{{- $one := dict "uri" .RelPermalink "title" .Title "description" (.Description | default "") -}}
- {{- $tags := .Params.tags | default slice -}}
+ {{- $tags := $params.tags | default slice -}}
{{- $one = delimit $tags "\n" | dict "tags" | merge $one -}}
- {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
+ {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormat | default "2006-01-02") -}}
{{- $one = dict "date" $publish_date | merge $one -}}
- {{- $content := partial "function/content.html" .Content | plainify -}}
+ {{- $content := dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | plainify -}}
{{- if gt .Site.Params.search.contentLength 0 -}}
{{- $content = substr $content 0 .Site.Params.search.contentLength -}}
{{- end -}}
diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html
index 9352c3e..be676a9 100644
--- a/layouts/partials/assets.html
+++ b/layouts/partials/assets.html
@@ -1,66 +1,60 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-{{- $CDN := $scratch.Get "CDN" -}}
-{{- $fingerprint := $scratch.Get "fingerprint" -}}
-{{- $config := dict "desktopHeaderMode" .Site.Params.header.desktopMode "mobileHeaderMode" .Site.Params.header.mobileMode -}}
-{{- with $scratch.Get "contentData" -}}
- {{- $config = dict "content" . | merge $config -}}
-{{- end -}}
-{{- with $scratch.Get "comment" -}}
- {{- $config = dict "comment" . | merge $config -}}
-{{- end -}}
+{{- $params := .Scratch.Get "params" -}}
+{{- $cdn := .Scratch.Get "cdn" | default dict -}}
+{{- $fingerprint := .Scratch.Get "fingerprint" -}}
+{{- $config := (.Scratch.Get "this").config -}}
{{- /* Fork Awesome */ -}}
-{{- if $scratch.Get "forkawesome" -}}
+{{- if (.Scratch.Get "this").forkawesome -}}
{{- $options := dict "targetPath" "lib/forkawesome/fork-awesome.min.css" -}}
- {{- dict "source" "lib/forkawesome/fork-awesome.scss" "toCSS" $options "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/forkawesome/fork-awesome.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
{{- /* iconfont */ -}}
-{{- if $scratch.Get "iconfont" -}}
- {{- with $CDN.iconfontCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+{{- if (.Scratch.Get "this").iconfont -}}
+ {{- with $cdn.iconfontCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/iconfont/iconfont.css" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/iconfont/iconfont.css" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
{{- end -}}
{{- /* Smooth Scroll */ -}}
-{{- with $CDN.smoothScrollJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+{{- with $cdn.smoothScrollJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/smooth-scroll/smooth-scroll.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/smooth-scroll/smooth-scroll.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* Search */ -}}
{{- if .Site.Params.search.enable -}}
- {{- with $CDN.autocompleteJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.autocompleteJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/autocomplete/autocomplete.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/autocomplete/autocomplete.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- $searchConfig := dict "noResultsFound" (T "noResultsFound") -}}
{{- if eq .Site.Params.search.type "lunr" -}}
{{- with .Site.Home.OutputFormats.Get "json" -}}
{{- $searchConfig = dict "type" "lunr" "lunrIndexURL" .RelPermalink | merge $searchConfig -}}
{{- end -}}
- {{- with $CDN.lunrJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.lunrJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/lunr/lunr.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/lunr/lunr.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- if ne .Language.Lang "en" -}}
{{- $searchConfig = T "lunrLanguageCode" | dict "lunrLanguageCode" | merge $searchConfig -}}
{{- if eq .Language.Lang "zh-cn" -}}
{{- $searchConfig = dict "lunrSegmentitURL" (resources.Get "lib/lunr/lunr.segmentit.js").RelPermalink | merge $searchConfig -}}
{{- end -}}
- {{- dict "source" "lib/lunr/lunr.stemmer.support.js" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
- {{- dict "source" (T "lunrLanguageLib") "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/lunr/lunr.stemmer.support.js" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
+ {{- dict "source" (T "lunrLanguageLib") "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- else if eq .Site.Params.search.type "algolia" -}}
- {{- with $CDN.algoliasearchJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.algoliasearchJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/algoliasearch/algoliasearch-lite.umd.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/algoliasearch/algoliasearch-lite.umd.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- $searchConfig = dict "type" "algolia" "algoliaIndex" .Site.Params.search.algolia.index "algoliaAppID" .Site.Params.search.algolia.appID "algoliaSearchKey" .Site.Params.search.algolia.searchKey | merge $searchConfig -}}
{{- end -}}
@@ -68,61 +62,63 @@
{{- end -}}
{{- /* lazysizes */ -}}
-{{- with $CDN.lazysizesJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+{{- with $cdn.lazysizesJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/lazysizes/lazysizes.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/lazysizes/lazysizes.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* lightgallery.js */ -}}
-{{- if ne .Site.Params.page.lightgallery false | and (ne .Params.lightgallery false) -}}
- {{- with $CDN.lightgalleryCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+{{- if $params.lightgallery -}}
+ {{- with $cdn.lightgalleryCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/lightgallery/lightgallery.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/lightgallery/lightgallery.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
- {{- with $CDN.lightgalleryJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.lightgalleryJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/lightgallery/lightgallery.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/lightgallery/lightgallery.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- with $CDN.lightgalleryThumbnailJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.lightgalleryThumbnailJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/lightgallery/lg-thumbnail.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/lightgallery/lg-thumbnail.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- with $CDN.lightgalleryZoomJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.lightgalleryZoomJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/lightgallery/lg-zoom.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/lightgallery/lg-zoom.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- $lightGalleryConfig := dict "selector" ".lightgallery" "speed" 400 "hideBarsDelay" 2000 "thumbnail" true "exThumbImage" "data-thumbnail" "thumbWidth" 80 "thumbContHeight" 80 "actualSize" false -}}
{{- $config = dict "lightGallery" $lightGalleryConfig | merge $config -}}
{{- end -}}
{{- /* clipboard.js */ -}}
-{{- with $CDN.clipboardJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
-{{- else -}}
- {{- dict "source" "lib/clipboard/clipboard.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+{{- if ne $params.copycode false -}}
+ {{- with $cdn.clipboardJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
+ {{- else -}}
+ {{- dict "source" "lib/clipboard/clipboard.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
+ {{- end -}}
+ {{- $config = T "copyToClipboard" | dict "title" | dict "clipboard" | merge $config -}}
{{- end -}}
-{{- $config = T "copyToClipboard" | dict "title" | dict "clipboard" | merge $config -}}
{{- /* Sharer.js */ -}}
-{{- if $scratch.Get "share" -}}
- {{- with $CDN.sharerJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+{{- if $params.share.enable -}}
+ {{- with $cdn.sharerJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/sharer/sharer.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/sharer/sharer.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- end -}}
{{- /* TypeIt */ -}}
-{{- with $scratch.Get "typeitMap" -}}
- {{- with $CDN.typeitJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+{{- with (.Scratch.Get "this").typeitMap -}}
+ {{- with $cdn.typeitJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/typeit/typeit.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/typeit/typeit.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- $typeitConfig := slice -}}
{{- range $key, $val := . -}}
@@ -132,40 +128,40 @@
{{- end -}}
{{- /* KaTeX */ -}}
-{{- if ne .Site.Params.math.enable false | and .Params.math -}}
- {{- with $CDN.katexCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+{{- if $params.math.enable -}}
+ {{- with $cdn.katexCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/katex/katex.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/katex/katex.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
- {{- with $CDN.katexJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.katexJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/katex/katex.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/katex/katex.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- with $CDN.katexAutoRenderJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.katexAutoRenderJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/katex/auto-render.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/katex/auto-render.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- $math := .Site.Params.math -}}
+ {{- $math := $params.math -}}
{{- if $math.copyTex -}}
- {{- with $CDN.katexCopyTexCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+ {{- with $cdn.katexCopyTexCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/katex/copy-tex.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/katex/copy-tex.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
- {{- with $CDN.katexCopyTexJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.katexCopyTexJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/katex/copy-tex.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/katex/copy-tex.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- end -}}
{{- if $math.mhchem -}}
- {{- with $CDN.katexMhchemJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.katexMhchemJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/katex/mhchem.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/katex/mhchem.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- end -}}
{{- $mathConfig := dict "strict" false -}}
@@ -182,91 +178,86 @@
{{- end -}}
{{- /* mermaid */ -}}
-{{- if $scratch.Get "mermaid" -}}
- {{- with $CDN.mermaidJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+{{- if (.Scratch.Get "this").mermaid -}}
+ {{- with $cdn.mermaidJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/mermaid/mermaid.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/mermaid/mermaid.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- $options := dict "targetPath" "lib/mermaid/mermaid.min.css" -}}
- {{- dict "source" "lib/mermaid/mermaid.scss" "toCSS" $options "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/mermaid/mermaid.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
{{- /* ECharts */ -}}
-{{- if $scratch.Get "echarts" -}}
- {{- with $CDN.echartsJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+{{- if (.Scratch.Get "this").echarts -}}
+ {{- with $cdn.echartsJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/echarts/echarts.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/echarts/echarts.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- with $CDN.echartsMacaronsJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.echartsMacaronsJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/echarts/macarons.js" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/echarts/macarons.js" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- end -}}
{{- /* Mapbox GL */ -}}
-{{- if $scratch.Get "mapbox" -}}
- {{- with $CDN.mapboxGLCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+{{- if (.Scratch.Get "this").mapbox -}}
+ {{- with $cdn.mapboxGLCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
- {{- with $CDN.mapboxGLJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.mapboxGLJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/mapbox-gl/mapbox-gl.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- dict "source" "lib/mapbox-gl/mapbox-gl-language.js" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
- {{- $mapbox := dict "accessToken" (.Params.mapbox.accessToken | default .Site.Params.mapbox.accessToken) "RTLTextPlugin" "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js" -}}
- {{- $config = dict "mapbox" $mapbox | merge $config -}}
+ {{- dict "source" "lib/mapbox-gl/mapbox-gl-language.js" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
+ {{- $config = dict "accessToken" $params.mapbox.accessToken "RTLTextPlugin" "https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.0/mapbox-gl-rtl-text.js" | dict "mapbox" | merge $config -}}
{{- end -}}
{{- /* Music */ -}}
-{{- if $scratch.Get "music" -}}
+{{- if (.Scratch.Get "this").music -}}
{{- /* APlayer */ -}}
- {{- with $CDN.aplayerCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+ {{- with $cdn.aplayerCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/aplayer/APlayer.min.css" "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/aplayer/APlayer.min.css" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
{{- $options := dict "targetPath" "lib/aplayer/dark.min.css" -}}
- {{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
- {{- with $CDN.aplayerJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/aplayer/dark.scss" "toCSS" $options "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
+ {{- with $cdn.aplayerJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/aplayer/APlayer.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/aplayer/APlayer.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- /* MetingJS */ -}}
- {{- with $CDN.metingJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.metingJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/meting/Meting.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/meting/Meting.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
{{- end -}}
-{{- /* Dev feature */ -}}
-{{- if .Params.dev -}}
-{{- end -}}
-
{{- /* Theme script */ -}}
-{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+{{- dict "source" "js/theme.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}
-{{- range $scratch.Get "stylesheet" -}}
+{{- range (.Scratch.Get "this").stylesheet -}}
{{- partial "plugin/stylesheet.html" . -}}
{{- end -}}
<script type="text/javascript">
- window.config = {{ jsonify $config | safeJS }};
+ window.config = {{ $config | jsonify | safeJS }};
</script>
{{- /* Polyfill.io */ -}}
{{- partial "plugin/script.html" (dict "source" "https://polyfill.io/v3/polyfill.min.js?features=Element.prototype.closest%2CrequestAnimationFrame%2CCustomEvent%2CPromise%2CObject.entries%2CObject.assign%2CObject.values%2Cfetch%2CElement.prototype.after") -}}
-{{- range $scratch.Get "script" -}}
+{{- range (.Scratch.Get "this").script -}}
{{- partial "plugin/script.html" . -}}
{{- end -}}
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
index d839174..bd52520 100644
--- a/layouts/partials/comment.html
+++ b/layouts/partials/comment.html
@@ -1,112 +1,106 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-{{- $CDN := $scratch.Get "CDN" -}}
-{{- $fingerprint := $scratch.Get "fingerprint" -}}
+{{- $cdn := .Scratch.Get "cdn" | default dict -}}
+{{- $fingerprint := .Scratch.Get "fingerprint" -}}
+{{- $comment := (.Scratch.Get "params").comment | default dict -}}
+{{- $commentConfig := dict -}}
-{{- if eq hugo.Environment "production" | and (ne .Site.Params.comment.enable false) | and (ne .Params.comment false) -}}
+{{- if $comment.enable -}}
<div id="comments">
{{- /* Disqus Comment System */ -}}
- {{- if .Site.Params.comment.disqus.enable -}}
+ {{- if $comment.disqus.enable -}}
<div id="disqus_thread" class="comment"></div>
- {{- $source := printf "https://%s.disqus.com/embed.js" .Site.Params.comment.disqus.shortname -}}
- {{- dict "source" $source "defer" true "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- $source := printf "https://%s.disqus.com/embed.js" $comment.disqus.shortname -}}
+ {{- dict "source" $source "defer" true "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://disqus.com/?ref_noscript">Disqus</a>.
</noscript>
{{- end -}}
{{- /* Gitalk Comment System */ -}}
- {{- if .Site.Params.comment.gitalk.enable -}}
- {{- $gitalk := .Site.Params.comment.gitalk -}}
+ {{- if $comment.gitalk.enable -}}
<div id="gitalk" class="comment"></div>
- {{- with $CDN.gitalkCSS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "stylesheet" -}}
+ {{- with $cdn.gitalkCSS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- else -}}
- {{- dict "source" "lib/gitalk/gitalk.css" "minify" true "fingerprint" $fingerprint | slice | $scratch.Add "stylesheet" -}}
+ {{- dict "source" "lib/gitalk/gitalk.css" "minify" true "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
{{- end -}}
- {{- with $CDN.gitalkJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- with $cdn.gitalkJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/gitalk/gitalk.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/gitalk/gitalk.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- $gitalkConfig := dict "id" .Date "title" .Title "clientID" $gitalk.clientId "clientSecret" $gitalk.clientSecret "repo" $gitalk.repo "owner" $gitalk.owner "admin" (slice $gitalk.owner) -}}
- {{- $scratch.SetInMap "comment" "gitalk" $gitalkConfig -}}
+ {{- $commentConfig = dict "id" .Date "title" .Title "clientID" $comment.gitalk.clientId "clientSecret" $comment.gitalk.clientSecret "repo" $comment.gitalk.repo "owner" $comment.gitalk.owner "admin" (slice $comment.gitalk.owner) | dict "gitalk" | merge $commentConfig -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://github.com/gitalk/gitalk"></a>Gitalk</a>.
</noscript>
{{- end -}}
{{- /* Valine Comment System */ -}}
- {{- if .Site.Params.comment.valine.enable -}}
- {{- $valine := .Site.Params.comment.valine -}}
+ {{- if $comment.valine.enable -}}
<div id="valine" class="comment"></div>
{{- $options := dict "targetPath" "lib/valine/valine.min.css" -}}
- {{- dict "source" "lib/valine/valine.scss" "toCSS" $options | slice | $scratch.Add "stylesheet" -}}
- {{- with $CDN.valineJS -}}
- {{- dict "source" . "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/valine/valine.scss" "toCSS" $options | dict "scratch" $.Scratch "data" | partial "scratch/stylesheet.html" -}}
+ {{- with $cdn.valineJS -}}
+ {{- dict "source" . "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- else -}}
- {{- dict "source" "lib/valine/Valine.min.js" "fingerprint" $fingerprint | slice | $scratch.Add "script" -}}
+ {{- dict "source" "lib/valine/Valine.min.js" "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
{{- end -}}
- {{- $valineConfig := dict "el" "#valine" "appId" $valine.appId "appKey" $valine.appKey "lang" ($valine.lang | default "en") "notify" $valine.notify "verify" $valine.verify "visitor" $valine.visitor "recordIP" $valine.recordIP -}}
- {{- with $valine.placeholder -}}
- {{- $valineConfig = dict "placeholder" . | merge $valineConfig -}}
+ {{- $commentConfig = dict "el" "#valine" "appId" $comment.valine.appId "appKey" $comment.valine.appKey "lang" ($comment.valine.lang | default (T "valineLang")) "notify" $comment.valine.notify "verify" $comment.valine.verify "visitor" $comment.valine.visitor "recordIP" $comment.valine.recordIP "placeholder" ($comment.valine.placeholder | default (T "valinePlaceholder")) | dict "valine" | merge $commentConfig -}}
+ {{- with $comment.valine.avatar -}}
+ {{- $commentConfig = dict "avatar" . | dict "valine" | merge $commentConfig -}}
{{- end -}}
- {{- with $valine.avatar -}}
- {{- $valineConfig = dict "avatar" . | merge $valineConfig -}}
+ {{- with $comment.valine.meta -}}
+ {{- $commentConfig = dict "meta" . | dict "valine" | merge $commentConfig -}}
{{- end -}}
- {{- with $valine.meta -}}
- {{- $valineConfig = dict "meta" . | merge $valineConfig -}}
+ {{- with $comment.valine.pageSize -}}
+ {{- $commentConfig = dict "pageSize" . | dict "valine" | merge $commentConfig -}}
{{- end -}}
- {{- with $valine.pageSize -}}
- {{- $valineConfig = dict "pageSize" . | merge $valineConfig -}}
- {{- end -}}
- {{- $scratch.SetInMap "comment" "valine" $valineConfig -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://valine.js.org/">Valine</a>.
</noscript>
{{- end -}}
{{- /* Facebook Comment System */ -}}
- {{- if .Site.Params.comment.facebook.enable -}}
- {{- $facebook := .Site.Params.comment.facebook -}}
+ {{- if $comment.facebook.enable -}}
<div id="fb-root" class="comment"></div>
<div
class="fb-comments"
- data-href="{{ .Site.Params.baseURL }}{{ .Permalink | absURL }}"
- data-width="{{ $facebook.width }}"
- data-numposts="{{ $facebook.numPosts }}"
+ data-href="{{ .Permalink | absURL }}"
+ data-width="{{ $comment.facebook.width }}"
+ data-numposts="{{ $comment.facebook.numPosts }}"
></div>
- {{- $source := printf "https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" $facebook.languageCode $facebook.appId -}}
- {{- dict "source" $source "defer" true "crossorigin" true | slice | $scratch.Add "script" -}}
+ {{- $source := printf "https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" ($comment.facebook.languageCode | default (T "facebookLanguageCode")) $comment.facebook.appId -}}
+ {{- dict "source" $source "defer" true "crossorigin" true | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://developers.facebook.com/docs/plugins/comments/"></a>Facebook</a>.
</noscript>
{{- end -}}
{{- /* Telegram Comments System */ -}}
- {{- if .Site.Params.comment.telegram.enable -}}
- {{- $telegram := .Site.Params.comment.telegram -}}
+ {{- if $comment.telegram.enable -}}
<div id="telegram-comments" class="comment"></div>
- {{- $attr := printf `data-comments-app-website="%s"` $telegram.siteID -}}
- {{- $attr = printf `%s data-limit="%s"` $attr ($telegram.limit | default 5) -}}
- {{- with $telegram.height -}}
+ {{- $attr := printf `data-comments-app-website="%s"` $comment.telegram.siteID -}}
+ {{- $attr = printf `%s data-limit="%s"` $attr ($comment.telegram.limit | default 5) -}}
+ {{- with $comment.telegram.height -}}
{{- $attr = printf `%s data-height="%s"` $attr . -}}
{{- end -}}
- {{- with $telegram.color -}}
+ {{- with $comment.telegram.color -}}
{{- $attr = printf `%s data-color="%s"` $attr . -}}
{{- end -}}
- {{- if $telegram.colorful -}}
+ {{- if $comment.telegram.colorful -}}
{{- $attr = printf `%s data-colorful="1"` $attr -}}
{{- end -}}
- {{- if $telegram.dislikes -}}
+ {{- if $comment.telegram.dislikes -}}
{{- $attr = printf `%s data-dislikes="1"` $attr -}}
{{- end -}}
- {{- if $telegram.outlined -}}
+ {{- if $comment.telegram.outlined -}}
{{- $attr = printf `%s data-outlined="1"` $attr -}}
{{- end -}}
- {{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "crossorigin" true "attr" $attr | slice | $scratch.Add "script" -}}
+ {{- dict "source" "https://comments.app/js/widget.js?2" "defer" true "crossorigin" true "attr" $attr | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
<noscript>
Please enable JavaScript to view the comments powered by <a href="https://comments.app/">Telegram Comments</a>.
</noscript>
{{- end -}}
</div>
{{- end -}}
+
+{{- dict "comment" $commentConfig | dict "config" | merge (.Scratch.Get "this") | .Scratch.Set "this" -}}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 51d80e2..e66c7c1 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,39 +1,50 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-
-<footer class="footer">
- <div class="copyright">
- {{- /* Hugo and LoveIt */ -}}
- <div class="copyright-line">
- {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}}
- {{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ $scratch.Get "version" }}"><i class="far fa-heart fa-fw"></i> LoveIt</a>
- </div>
-
- <div class="copyright-line">
- {{- /* Copyright year */ -}}
- <i class="far fa-copyright fa-fw"></i>
- {{- with .Site.Params.footer.since -}}
- <span itemprop="copyrightYear">
- {{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
- </span>
- {{- else -}}
- <span itemprop="copyrightYear">{{ now.Year }}</span>
+{{- if ne .Site.Params.footer.enable false -}}
+ <footer class="footer">
+ <div class="footer-container">
+ {{- /* Custom Content */ -}}
+ {{- with .Site.Params.footer.custom -}}
+ <div class="footer-line">
+ {{- safeHTML . -}}
+ </div>
{{- end -}}
- {{- /* Author */ -}}
- {{- with .Site.Author.name -}}
- <span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $.Site.Author.link | default (relLangURL `/`) }}" target="_blank">{{ . }}</a></span>
+ {{- /* Hugo and LoveIt */ -}}
+ {{- if ne .Site.Params.footer.hugo false -}}
+ <div class="footer-line">
+ {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}}
+ {{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-heart fa-fw"></i> LoveIt</a>
+ </div>
{{- end -}}
- {{- /* License */ -}}
- {{- with .Site.Params.footer.license -}}
- &nbsp;|&nbsp;<span class="license">{{ . | safeHTML }}</span>
- {{- end -}}
+ <div class="footer-line">
+ {{- /* Copyright year */ -}}
+ {{- if ne .Site.Params.footer.copyright false -}}
+ <i class="far fa-copyright fa-fw"></i>
+ {{- with .Site.Params.footer.since -}}
+ <span itemprop="copyrightYear">
+ {{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
+ </span>
+ {{- else -}}
+ <span itemprop="copyrightYear">{{ now.Year }}</span>
+ {{- end -}}
+ {{- end -}}
- {{- /* ICP */ -}}
- {{- with .Site.Params.footer.icp -}}
- <span class="icp-splitter">&nbsp;|&nbsp;</span><br class="icp-br"/>
- <span class="icp">{{ . | safeHTML }}</span>
- {{- end -}}
+ {{- /* Author */ -}}
+ {{- if ne .Site.Params.footer.author false -}}
+ <span class="author" itemprop="copyrightHolder">&nbsp;<a href="{{ $.Site.Author.link | default (relLangURL `/`) }}" target="_blank">{{ .Site.Author.name }}</a></span>
+ {{- end -}}
+
+ {{- /* License */ -}}
+ {{- with .Site.Params.footer.license -}}
+ &nbsp;|&nbsp;<span class="license">{{ . | safeHTML }}</span>
+ {{- end -}}
+
+ {{- /* ICP */ -}}
+ {{- with .Site.Params.footer.icp -}}
+ <span class="icp-splitter">&nbsp;|&nbsp;</span><br class="icp-br"/>
+ <span class="icp">{{ . | safeHTML }}</span>
+ {{- end -}}
+ </div>
</div>
- </div>
-</footer>
+ </footer>
+{{- end -}}
diff --git a/layouts/partials/function/content.html b/layouts/partials/function/content.html
index 3b81be4..fa75ae4 100644
--- a/layouts/partials/function/content.html
+++ b/layouts/partials/function/content.html
@@ -1,10 +1,16 @@
-{{- $content := . -}}
+{{- $content := .content -}}
-{{- $content = partial "function/ruby.html" $content -}}
+{{- if .ruby -}}
+ {{- $content = partial "function/ruby.html" $content -}}
+{{- end -}}
-{{- $content = partial "function/fraction.html" $content -}}
+{{- if .fraction -}}
+ {{- $content = partial "function/fraction.html" $content -}}
+{{- end -}}
-{{- $content = partial "function/fontawesome.html" $content -}}
+{{- if .fontawesome -}}
+ {{- $content = partial "function/fontawesome.html" $content -}}
+{{- end -}}
{{- $content = partial "function/checkbox.html" $content -}}
diff --git a/layouts/partials/function/id.html b/layouts/partials/function/id.html
index b9e15ff..4adeb70 100644
--- a/layouts/partials/function/id.html
+++ b/layouts/partials/function/id.html
@@ -3,6 +3,6 @@
{{- /* shuffle md5 as id */ -}}
{{- $id := delimit (split (md5 now.Unix) "" | shuffle | first 6) "" | printf "id-%s" -}}
{{- with .scratch -}}
- {{- .SetInMap "contentData" $id $.content -}}
+ {{- dict $id $.content | dict "data" | dict "config" | merge (.Get "this") | .Set "this" -}}
{{- end -}}
{{- return $id -}}
diff --git a/layouts/partials/head/link.html b/layouts/partials/head/link.html
index 82135ff..b0103d4 100644
--- a/layouts/partials/head/link.html
+++ b/layouts/partials/head/link.html
@@ -1,6 +1,5 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-{{- $CDN := $scratch.Get "CDN" -}}
-{{- $fingerprint := $scratch.Get "fingerprint" -}}
+{{- $cdn := .Scratch.Get "cdn" | default dict -}}
+{{- $fingerprint := .Scratch.Get "fingerprint" -}}
<link rel="canonical" href="{{ .Permalink }}" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
@@ -23,7 +22,7 @@
{{- end -}}
{{- /* normalize.css */ -}}
-{{- $source := $CDN.normalizeCSS | default "lib/normalize/normalize.min.css" -}}
+{{- $source := $cdn.normalizeCSS | default "lib/normalize/normalize.min.css" -}}
{{- $stylesheet := dict "source" $source "fingerprint" $fingerprint -}}
{{- partial "plugin/stylesheet.html" $stylesheet -}}
@@ -34,11 +33,11 @@
{{- partial "plugin/stylesheet.html" $stylesheet -}}
{{- /* Font Awesome */ -}}
-{{- $source := $CDN.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}}
+{{- $source := $cdn.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}}
{{- $stylesheet := dict "source" $source "fingerprint" $fingerprint -}}
{{- partial "plugin/stylesheet.html" $stylesheet -}}
{{- /* Animate.css */ -}}
-{{- $source := $CDN.animateCSS | default "lib/animate/animate.min.css" -}}
+{{- $source := $cdn.animateCSS | default "lib/animate/animate.min.css" -}}
{{- $stylesheet := dict "source" $source "fingerprint" $fingerprint -}}
{{- partial "plugin/stylesheet.html" $stylesheet -}}
diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html
index 7fa7996..6b5208e 100644
--- a/layouts/partials/head/seo.html
+++ b/layouts/partials/head/seo.html
@@ -1,3 +1,5 @@
+{{- $params := .Scratch.Get "params" -}}
+
{{- with .Site.Params.verification.google -}}
<meta name="google-site-verification" content="{{ . }}" />
{{- end -}}
@@ -33,10 +35,10 @@
{{- with .Site.Params.description -}}
"description": "{{ . | safeJS }}",
{{- end -}}
- {{- with .Site.Params.image -}}
+ {{- with $params.seo.image -}}
"image": "{{ .url | absURL }}",
{{- end -}}
- {{- with .Site.Params.logo -}}
+ {{- with $params.seo.logo -}}
"thumbnailUrl": "{{ .url | absURL }}",
{{- end -}}
{{- with .Site.Copyright -}}
@@ -58,12 +60,12 @@
"@type": "WebPage",
"@id": "{{ .Permalink }}"
},
- {{- if ge .Site.Params.image.width 696 -}}
+ {{- if ge $params.seo.image.width 696 -}}
"image": {
"@type": "ImageObject",
- "url": "{{ .Site.Params.image.url | absURL }}",
- "width": {{ .Site.Params.image.width }},
- "height": {{ .Site.Params.image.height }}
+ "url": "{{ $params.seo.image.url | absURL }}",
+ "width": {{ $params.seo.image.width }},
+ "height": {{ $params.seo.image.height }}
},
{{- end -}}
"genre": "{{ .Type }}",
@@ -83,7 +85,7 @@
{{- with .Site.Copyright -}}
"license": "{{ . | safeJS }}",
{{- end -}}
- {{- with .Site.Params.publisher -}}
+ {{- with $params.seo.publisher -}}
"publisher": {
"@type": "Organization",
"name": "{{ .name | safeJS }}",
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index e78a70a..c4d5956 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -36,7 +36,7 @@
{{- end -}}
{{- if .Site.Params.search.enable -}}
<span class="menu-item search" id="search-desktop">
- <input type="text" placeholder="{{ T `searchPlaceholder` }}" id="search-input-desktop">
+ <input type="text" placeholder="{{ .Site.Params.search.placeholder | default (T `searchPlaceholder`) }}" id="search-input-desktop">
<a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="{{ T `search` }}">
<i class="fas fa-search fa-fw"></i>
</a>
@@ -73,7 +73,7 @@
{{- if .Site.Params.search.enable -}}
<div class="search-wrapper">
<div class="search mobile" id="search-mobile">
- <input type="text" placeholder="{{ T `searchPlaceholder` }}" id="search-input-mobile">
+ <input type="text" placeholder="{{ .Site.Params.search.placeholder | default (T `searchPlaceholder`) }}" id="search-input-mobile">
<a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="{{ T `search` }}">
<i class="fas fa-search fa-fw"></i>
</a>
diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html
index bcf08c8..44223a9 100644
--- a/layouts/partials/home/profile.html
+++ b/layouts/partials/home/profile.html
@@ -1,5 +1,3 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-
<div class="home-profile">
{{- $avatar := .Site.Params.home.profile.avatarURL -}}
{{- with .Site.Params.home.profile.gravatarEmail -}}
@@ -16,9 +14,9 @@
{{- with .Site.Params.home.profile.subtitle -}}
<h2 class="home-subtitle">
{{- if $.Site.Params.home.profile.typeit -}}
- {{- $id := partial "function/id.html" (dict "content" . "scratch" $scratch) -}}
+ {{- $id := partial "function/id.html" (dict "content" . "scratch" $.Scratch) -}}
<div id="{{ $id }}" class="typeit"></div>
- {{- $scratch.SetInMap "typeitMap" $id (slice $id) -}}
+ {{- dict $id (slice $id) | dict "typeitMap" | merge ($.Scratch.Get "this") | $.Scratch.Set "this" -}}
{{- else -}}
{{- . -}}
{{- end -}}
@@ -26,7 +24,7 @@
{{- end -}}
{{- if .Site.Params.home.profile.social -}}
- {{- partial "plugin/social.html" (dict "social" .Site.Params.social "scratch" $scratch) -}}
+ {{- partial "plugin/social.html" (dict "social" .Site.Params.social "scratch" $.Scratch) -}}
{{- end -}}
{{- with .Site.Params.home.profile.disclaimer -}}
diff --git a/layouts/partials/plugin/icon.html b/layouts/partials/plugin/icon.html
index cb06e04..0f69c17 100644
--- a/layouts/partials/plugin/icon.html
+++ b/layouts/partials/plugin/icon.html
@@ -12,14 +12,14 @@
{{- end -}}
{{- $classList = $newClassList -}}
{{- with .scratch -}}
- {{- .Set "forkawesome" true -}}
+ {{- dict "forkawesome" true | merge (.Get "this") | .Set "this" -}}
{{- end -}}
{{- /* default is Font Awesome */ -}}
{{- /* Others */ -}}
{{- else if ne $type "fa" -}}
{{- with .scratch -}}
- {{- .Set "iconfont" true -}}
+ {{- dict "iconfont" true | merge (.Get "this") | .Set "this" -}}
{{- end -}}
{{- end -}}
<i class="{{ delimit $classList ` ` }}"></i> \ No newline at end of file
diff --git a/layouts/partials/plugin/share.html b/layouts/partials/plugin/share.html
index 08eba8f..176c54d 100644
--- a/layouts/partials/plugin/share.html
+++ b/layouts/partials/plugin/share.html
@@ -1,199 +1,197 @@
-{{- $scratch := .Scratch.Get "scratch" -}}
-
-{{- if ne .Site.Params.share.enable false | and (ne .Params.share.enable false) -}}
- {{- $scratch.Set "share" true -}}
+{{- $share := (.Scratch.Get "params").page.share | default dict -}}
+{{- if $share.enable -}}
{{- /* 001: Twitter */ -}}
- {{- if .Params.Share.Twitter | default .Site.Params.Share.Twitter | eq true -}}
+ {{- if $share.Twitter -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Twitter" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-twitter fa-fw") -}}
</a>
{{- end -}}
{{- /* 002: Facebook */ -}}
- {{- if .Params.Share.Facebook | default .Site.Params.Share.Facebook | eq true -}}
+ {{- if $share.Facebook -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Facebook" data-sharer="facebook" data-url="{{ .Permalink }}"{{ with .Params.tags }} data-hashtag="{{ index . 0 }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-facebook-square fa-fw") -}}
</a>
{{- end -}}
{{- /* 003: Linkedin */ -}}
- {{- if .Params.Share.Linkedin | default .Site.Params.Share.Linkedin | eq true -}}
+ {{- if $share.Linkedin -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Linkedin" data-sharer="linkedin" data-url="{{ .Permalink }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-linkedin fa-fw") -}}
</a>
{{- end -}}
{{- /* 004: WhatsApp */ -}}
- {{- if .Params.Share.Whatsapp | default .Site.Params.Share.Whatsapp | eq true -}}
+ {{- if $share.Whatsapp -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} WhatsApp" data-sharer="whatsapp" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-web>
{{- partial "plugin/icon.html" (dict "class" "fab fa-whatsapp fa-fw") -}}
</a>
{{- end -}}
{{- /* 005: Viber */ -}}
- {{- if .Params.Share.Viber | default .Site.Params.Share.Viber | eq true -}}
+ {{- if $share.Viber -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Viber" data-sharer="viber" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-viber fa-fw") -}}
</a>
{{- end -}}
{{- /* 006: Pinterest */ -}}
- {{- if .Params.Share.Pinterest | default .Site.Params.Share.Pinterest | eq true -}}
+ {{- if $share.Pinterest -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Pinterest" data-sharer="pinterest" data-url="{{ .Permalink }}"{{ with .Description }} data-description="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-pinterest fa-fw") -}}
</a>
{{- end -}}
{{- /* 007: Tumblr */ -}}
- {{- if .Params.Share.Tumblr | default .Site.Params.Share.Tumblr | eq true -}}
+ {{- if $share.Tumblr -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Tumblr" data-sharer="tumblr" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.tags }} data-tags="{{ delimit . `,` }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-tumblr fa-fw") -}}
</a>
{{- end -}}
{{- /* 008: Hacker News */ -}}
- {{- if .Params.Share.Hackernews | default .Site.Params.Share.Hackernews | eq true -}}
+ {{- if $share.Hackernews -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Hacker News" data-sharer="hackernews" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-hacker-news fa-fw") -}}
</a>
{{- end -}}
{{- /* 009: Reddit */ -}}
- {{- if .Params.Share.Reddit | default .Site.Params.Share.Reddit | eq true -}}
+ {{- if $share.Reddit -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Reddit" data-sharer="reddit" data-url="{{ .Permalink }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-reddit fa-fw") -}}
</a>
{{- end -}}
{{- /* 010: VK */ -}}
- {{- if .Params.Share.VK | default .Site.Params.Share.VK | eq true -}}
+ {{- if $share.VK -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} VK" data-sharer="vk" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-vk fa-fw") -}}
</a>
{{- end -}}
{{- /* 011: Buffer */ -}}
- {{- if .Params.Share.Buffer | default .Site.Params.Share.Buffer | eq true -}}
+ {{- if $share.Buffer -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Buffer" data-sharer="buffer" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-picture="{{ . }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-buffer fa-fw") -}}
</a>
{{- end -}}
{{- /* 012: Xing */ -}}
- {{- if .Params.Share.Xing | default .Site.Params.Share.Xing | eq true -}}
+ {{- if $share.Xing -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Xing" data-sharer="xing" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-xing fa-fw") -}}
</a>
{{- end -}}
{{- /* 013: Line */ -}}
- {{- if .Params.Share.Line | default .Site.Params.Share.Line | eq true -}}
+ {{- if $share.Line -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Line" data-sharer="line" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-line fa-fw") -}}
</a>
{{- end -}}
{{- /* 014: Instapaper */ -}}
- {{- if .Params.Share.Instapaper | default .Site.Params.Share.Instapaper | eq true -}}
+ {{- if $share.Instapaper -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Instapaper" data-sharer="instapaper" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
- {{- partial "plugin/icon.html" (dict "class" "loveit it-instapaper-fill" "type" "other" "scratch" $scratch) -}}
+ {{- partial "plugin/icon.html" (dict "class" "loveit it-instapaper-fill" "type" "other" "scratch" .Scratch) -}}
</a>
{{- end -}}
{{- /* 015: Pocket */ -}}
- {{- if .Params.Share.Pocket | default .Site.Params.Share.Pocket | eq true -}}
+ {{- if $share.Pocket -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Pocket" data-sharer="pocket" data-url="{{ .Permalink }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-get-pocket fa-fw") -}}
</a>
{{- end -}}
{{- /* 016: Digg */ -}}
- {{- if .Params.Share.Digg | default .Site.Params.Share.Digg | eq true -}}
+ {{- if $share.Digg -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Digg" data-sharer="digg" data-url="{{ .Permalink }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-digg fa-fw") -}}
</a>
{{- end -}}
{{- /* 017: StumbleUpon */ -}}
- {{- if .Params.Share.Stumbleupon | default .Site.Params.Share.Stumbleupon | eq true -}}
+ {{- if $share.Stumbleupon -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} StumbleUpon" data-sharer="stumbleupon" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-stumbleupon fa-fw") -}}
</a>
{{- end -}}
{{- /* 018: Flipboard */ -}}
- {{- if .Params.Share.Flipboard | default .Site.Params.Share.Flipboard | eq true -}}
+ {{- if $share.Flipboard -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Flipboard" data-sharer="flipboard" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-flipboard fa-fw") -}}
</a>
{{- end -}}
{{- /* 019: å¾®åš */ -}}
- {{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
+ {{- if $share.Weibo -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} å¾®åš" data-sharer="weibo" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}{{ with .Site.Params.Social.Weibo }} data-ralateuid="{{ . }}"{{ end }}>
{{- partial "plugin/icon.html" (dict "class" "fab fa-weibo fa-fw") -}}
</a>
{{- end -}}
{{- /* 020: 人人 */ -}}
- {{- if .Params.Share.Renren | default .Site.Params.Share.Renren | eq true -}}
+ {{- if $share.Renren -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} 人人" data-sharer="renren" data-url="{{ .Permalink }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-renren fa-fw") -}}
</a>
{{- end -}}
{{- /* 021: Myspace */ -}}
- {{- if .Params.Share.Myspace | default .Site.Params.Share.Myspace | eq true -}}
+ {{- if $share.Myspace -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Myspace" data-sharer="myspace" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
- {{- partial "plugin/icon.html" (dict "class" "loveit it-myspace-fill" "type" "other" "scratch" $scratch) -}}
+ {{- partial "plugin/icon.html" (dict "class" "loveit it-myspace-fill" "type" "other" "scratch" .Scratch) -}}
</a>
{{- end -}}
{{- /* 022: Blogger */ -}}
- {{- if .Params.Share.Blogger | default .Site.Params.Share.Blogger | eq true -}}
+ {{- if $share.Blogger -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Blogger" data-sharer="blogger" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-blogger fa-fw") -}}
</a>
{{- end -}}
{{- /* 023: 百度 */ -}}
- {{- if .Params.Share.Baidu | default .Site.Params.Share.Baidu | eq true -}}
+ {{- if $share.Baidu -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} 百度" data-sharer="baidu" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
- {{- partial "plugin/icon.html" (dict "class" "loveit it-baidu-fill" "type" "other" "scratch" $scratch) -}}
+ {{- partial "plugin/icon.html" (dict "class" "loveit it-baidu-fill" "type" "other" "scratch" .Scratch) -}}
</a>
{{- end -}}
{{- /* 024: OK.RU */ -}}
- {{- if .Params.Share.Odnoklassniki | default .Site.Params.Share.Odnoklassniki | eq true -}}
+ {{- if $share.Odnoklassniki -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} OK.RU" data-sharer="okru" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-odnoklassniki fa-fw") -}}
</a>
{{- end -}}
{{- /* 025: Evernote */ -}}
- {{- if .Params.Share.Evernote | default .Site.Params.Share.Evernote | eq true -}}
+ {{- if $share.Evernote -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Evernote" data-sharer="evernote" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-evernote fa-fw") -}}
</a>
{{- end -}}
{{- /* 026: Skype */ -}}
- {{- if .Params.Share.Skype | default .Site.Params.Share.Skype | eq true -}}
+ {{- if $share.Skype -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Skype" data-sharer="skype" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-skype fa-fw") -}}
</a>
{{- end -}}
{{- /* 027: Trello */ -}}
- {{- if .Params.Share.Trello | default .Site.Params.Share.Trello | eq true -}}
+ {{- if $share.Trello -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Trello" data-sharer="trello" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
{{- partial "plugin/icon.html" (dict "class" "fab fa-trello fa-fw") -}}
</a>
{{- end -}}
{{- /* 028: Mix */ -}}
- {{- if .Params.Share.Mix | default .Site.Params.Share.Mix | eq true -}}
+ {{- if $share.Mix -}}
<a href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T `shareOn` }} Mix">
{{- partial "plugin/icon.html" (dict "class" "fab fa-mix fa-fw") -}}
</a>
diff --git a/layouts/partials/scratch/script.html b/layouts/partials/scratch/script.html
new file mode 100644
index 0000000..6665ff2
--- /dev/null
+++ b/layouts/partials/scratch/script.html
@@ -0,0 +1,4 @@
+{{- $this := .scratch.Get "this" -}}
+{{- $script := $this.script | default slice -}}
+{{- $script = $script | append (slice .data) -}}
+{{- .scratch.SetInMap "this" "script" $script -}}
diff --git a/layouts/partials/scratch/stylesheet.html b/layouts/partials/scratch/stylesheet.html
new file mode 100644
index 0000000..fe3ff79
--- /dev/null
+++ b/layouts/partials/scratch/stylesheet.html
@@ -0,0 +1,4 @@
+{{- $this := .scratch.Get "this" -}}
+{{- $stylesheet := $this.stylesheet | default slice -}}
+{{- $stylesheet = $stylesheet | append (slice .data) -}}
+{{- .scratch.SetInMap "this" "stylesheet" $stylesheet -}}
diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html
index e7aa2b7..ab03cad 100644
--- a/layouts/partials/single/footer.html
+++ b/layouts/partials/single/footer.html
@@ -1,4 +1,5 @@
-{{- $modify_date := .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
+{{- $params := .Scratch.Get "params" -}}
+{{- $modify_date := .Lastmod.Format (.Site.Params.dateformat | default "2006-01-02") -}}
<div class="post-footer" id="post-footer">
<div class="post-info">
<div class="post-info-line">
@@ -14,16 +15,16 @@
</span>
</div>
<div class="post-info-license">
- {{- if .Params.license -}}
+ {{- with $params.license -}}
<span>
- {{- printf (T "license") .Params.license | safeHTML -}}
+ {{- printf (T "license") . | safeHTML -}}
</span>
{{- end -}}
</div>
</div>
<div class="post-info-line">
<div class="post-info-md">
- {{- if ne .Site.Params.page.linkToMarkdown false | and (ne .Params.linkToMarkdown false) -}}
+ {{- if $params.linktomarkdown -}}
{{- with .OutputFormats.Get "markdown" -}}
<span>
<a class="link-to-markdown" href="{{ .RelPermalink }}" target="_blank">
@@ -43,7 +44,7 @@
<div class="post-info-more">
<section class="post-tags">
- {{- with .Params.tags -}}
+ {{- with $params.tags -}}
<i class="fas fa-tags fa-fw"></i>&nbsp;
{{- range $index, $value := . -}}
{{- if gt $index 0 }},&nbsp;{{ end -}}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index e128589..ba0a078 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -1,35 +1,36 @@
{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}}
{{- define "content" -}}
- {{- $scratch := .Scratch.Get "scratch" -}}
+ {{- $params := .Scratch.Get "params" -}}
{{- /* Auto TOC */ -}}
- {{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
+ {{- if ne $params.toc.enable false -}}
<div class="toc" id="toc-auto">
<h2 class="toc-title">{{ T "contents" }}</h2>
- {{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
- <div class="toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false)) }} always-active{{ end }}" id="toc-content-auto"></div>
+ <div class="toc-content{{ if eq $params.toc.auto false }} always-active{{ end }}" id="toc-content-auto"></div>
</div>
{{- end -}}
<article class="page single">
{{- /* Title */ -}}
<h1 class="single-title animated flipInX">{{ .Title }}</h1>
- {{- with .Params.subtitle -}}
+
+ {{- /* Subtitle */ -}}
+ {{- with $params.subtitle -}}
<h2 class="single-subtitle">{{ . }}</h2>
{{- end -}}
{{- /* Meta */ -}}
<div class="post-meta">
<div class="post-meta-line">
- {{- $author := .Params.author | default .Site.Author.name | default (T "author") -}}
- {{- $authorLink := .Params.authorLink | default .Site.Author.link | default (relLangURL "/") -}}
+ {{- $author := $params.author | default .Site.Author.name | default (T "author") -}}
+ {{- $authorLink := $params.authorlink | default .Site.Author.link | default (relLangURL "/") -}}
<span class="post-author">
{{- $options := dict "class" "author" "href" $authorLink "title" "Author" "rel" "author" "icon" (dict "class" "fas fa-user-circle fa-fw") "content" $author -}}
{{- partial "plugin/link.html" $options -}}
</span>
- {{- with .Params.categories -}}
+ {{- with $params.categories -}}
&nbsp;
<span class="post-category">
{{- T "included" -}}
@@ -43,11 +44,12 @@
{{- end -}}
</div>
<div class="post-meta-line">
- {{- $publish_date := .PublishDate.Format (.Site.Params.dateFormatToUse | default "2006-01-02") -}}
+ {{- $publish_date := .PublishDate.Format (.Site.Params.dateformat | default "2006-01-02") -}}
<i class="far fa-calendar-alt fa-fw"></i><time datetime={{ $publish_date }}>{{ $publish_date }}</time>&nbsp;
<i class="fas fa-pencil-alt fa-fw"></i>{{ T "wordCount" .WordCount }}&nbsp;
<i class="far fa-clock fa-fw"></i>{{ T "readingTime" .ReadingTime }}&nbsp;
- {{- if eq hugo.Environment "production" | and .Site.Params.comment.valine.enable | and .Site.Params.comment.valine.visitor -}}
+ {{- $comment := $params.comment | default dict -}}
+ {{- if $comment.enable | and $comment.valine.enable | and $comment.valine.visitor -}}
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
<i class="far fa-eye fa-fw"></i><span class=leancloud-visitors-count></span>&nbsp;{{ T "views" }}
</span>&nbsp;
@@ -56,14 +58,14 @@
</div>
{{- /* Featured image */ -}}
- {{- with .Params.featuredImage -}}
+ {{- with $params.featuredimage -}}
<div class="featured-image">
{{- partial "plugin/image.html" (dict "src" . "alt" $.Description "large" true) -}}
</div>
{{- end -}}
{{- /* Static TOC */ -}}
- {{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
+ {{- if $params.toc.enable -}}
<div class="toc" id="toc-static">
<details>
<summary>
@@ -84,15 +86,13 @@
{{- /* Content */ -}}
<div class="content" id="content">
- {{- partial "function/content.html" .Content | safeHTML -}}
+ {{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
{{- /* Footer */ -}}
{{- partial "single/footer.html" . -}}
{{- /* Comment */ -}}
- {{- if ( .Params.comment | default true ) -}}
- {{- partial "comment.html" . -}}
- {{- end -}}
+ {{- partial "comment.html" . -}}
</article>
{{- end -}}
diff --git a/layouts/shortcodes/echarts.html b/layouts/shortcodes/echarts.html
index ec0e4c8..a3b3cdd 100644
--- a/layouts/shortcodes/echarts.html
+++ b/layouts/shortcodes/echarts.html
@@ -1,8 +1,6 @@
-{{- $scratch := .Page.Scratch.Get "scratch" -}}
-
{{- $content := .Inner | transform.Unmarshal | jsonify -}}
-{{- $id := partial "function/id.html" (dict "content" $content "scratch" $scratch) -}}
+{{- $id := partial "function/id.html" (dict "content" $content "scratch" .Page.Scratch) -}}
{{- $width := cond .IsNamedParams (.Get "width") (.Get 0) | default "100%" -}}
{{- $height := cond .IsNamedParams (.Get "height") (.Get 1) | default "30rem" -}}
<div class="echarts" id="{{ $id }}" style="width: {{ $width }}; height: {{ $height }};"></div>
-{{- $scratch.Set "echarts" true -}}
+{{- dict "echarts" true | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
diff --git a/layouts/shortcodes/mapbox.html b/layouts/shortcodes/mapbox.html
index 6aa2a79..e5749f6 100644
--- a/layouts/shortcodes/mapbox.html
+++ b/layouts/shortcodes/mapbox.html
@@ -1,15 +1,15 @@
-{{- $scratch := .Page.Scratch.Get "scratch" -}}
+{{- $mapbox := (.Page.Scratch.Get "params").page.mapbox | default dict -}}
{{- $lng := cond .IsNamedParams (.Get "lng") (.Get 0) -}}
{{- $lat := cond .IsNamedParams (.Get "lat") (.Get 1) -}}
{{- $zoom := cond .IsNamedParams (.Get "zoom") (.Get 2) | default 10 -}}
{{- $marked := cond .IsNamedParams (.Get "marked") (.Get 3) | ne false -}}
-{{- $lightStyle := .Page.Params.mapbox.lightStyle | default .Page.Site.Params.mapbox.lightStyle -}}
-{{- $darkStyle := .Page.Params.mapbox.darkStyle | default .Page.Site.Params.mapbox.darkStyle -}}
-{{- $navigation := ne .Page.Params.mapbox.navigation false | and (ne .Page.Site.Params.mapbox.navigation false) -}}
-{{- $geolocate := ne .Page.Params.mapbox.geolocate false | and (ne .Page.Site.Params.mapbox.geolocate false) -}}
-{{- $scale := ne .Page.Params.mapbox.scale false | and (ne .Page.Site.Params.mapbox.scale false) -}}
-{{- $fullscreen := ne .Page.Params.mapbox.fullscreen false | and (ne .Page.Site.Params.mapbox.fullscreen false) -}}
+{{- $lightStyle := $mapbox.lightStyle -}}
+{{- $darkStyle := $mapbox.darkStyle -}}
+{{- $navigation := $mapbox.navigation -}}
+{{- $geolocate := $mapbox.geolocate -}}
+{{- $scale := $mapbox.scale -}}
+{{- $fullscreen := $mapbox.fullscreen -}}
{{- $width := "100%" -}}
{{- $height := "20rem" -}}
@@ -28,6 +28,6 @@
{{- end -}}
{{- $darkStyle = $darkStyle | default $lightStyle -}}
{{- $options := dict "lng" $lng "lat" $lat "zoom" $zoom "marked" $marked "lightStyle" $lightStyle "darkStyle" $darkStyle "geolocate" $geolocate "navigation" $navigation "scale" $scale "fullscreen" $fullscreen -}}
-{{- $id := partial "function/id.html" (dict "content" $options "scratch" $scratch) -}}
+{{- $id := partial "function/id.html" (dict "content" $options "scratch" .Page.Scratch) -}}
<div class="mapbox" id="{{ $id }}" style="width: {{ $width }}; height: {{ $height }};"></div>
-{{- $scratch.Set "mapbox" true -}}
+{{- dict "mapbox" true | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html
index 872fae8..61f0d9b 100644
--- a/layouts/shortcodes/mermaid.html
+++ b/layouts/shortcodes/mermaid.html
@@ -1,5 +1,3 @@
-{{- $scratch := .Page.Scratch.Get "scratch" -}}
-
-{{- $id := partial "function/id.html" (dict "content" (trim .Inner "\n") "scratch" $scratch) -}}
+{{- $id := partial "function/id.html" (dict "content" (trim .Inner "\n") "scratch" .Page.Scratch) -}}
<div class="mermaid" id="{{ $id }}"></div>
-{{- $scratch.Set "mermaid" true -}}
+{{- dict "mermaid" true | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
diff --git a/layouts/shortcodes/music.html b/layouts/shortcodes/music.html
index 82228fc..0933914 100644
--- a/layouts/shortcodes/music.html
+++ b/layouts/shortcodes/music.html
@@ -1,5 +1,3 @@
-{{- $scratch := .Page.Scratch.Get "scratch" -}}
-
{{- $theme := "#448aff" -}}
{{- if .IsNamedParams -}}
{{- $theme = .Get "theme" | default $theme -}}
@@ -41,4 +39,4 @@
{{- else -}}
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="{{ $theme }}"></meting-js>
{{- end -}}
-{{- $scratch.Set "music" true -}}
+{{- dict "music" true | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
diff --git a/layouts/shortcodes/typeit.html b/layouts/shortcodes/typeit.html
index fdbecf1..95aa89e 100644
--- a/layouts/shortcodes/typeit.html
+++ b/layouts/shortcodes/typeit.html
@@ -1,5 +1,3 @@
-{{- $scratch := .Page.Scratch.Get "scratch" -}}
-
{{- $content := .Inner -}}
{{- $classList := .Get "class" | slice -}}
{{- $tag := .Get "tag" | default "div" -}}
@@ -22,11 +20,11 @@
{{- /* trim the newline */ -}}
{{- $content = trim $content "\n" -}}
-{{- $id := partial "function/id.html" (dict "content" $content "scratch" $scratch) -}}
-{{- $key := .Get "group" | default $id -}}
-{{- $group := index ($scratch.Get "typeitMap" | default dict) $key -}}
+{{- $id := partial "function/id.html" (dict "content" $content "scratch" .Page.Scratch) -}}
+{{- $key := .Get "group" | string | default $id -}}
+{{- $group := index ((.Page.Scratch.Get "this").typeitMap | default dict) $key -}}
{{- $group = $group | default slice | append $id -}}
-{{- $scratch.SetInMap "typeitMap" $key $group -}}
+{{- dict $key $group | dict "typeitMap" | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
<div class="typeit">
{{- printf `<%s id="%s" class="%s"></%s>` $tag $id (delimit $classList " ") $tag | safeHTML -}}
diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html
index 34bd9d6..cd60dba 100644
--- a/layouts/taxonomy/list.html
+++ b/layouts/taxonomy/list.html
@@ -12,12 +12,13 @@
{{- else if eq $taxonomy "tag" -}}
<i class="fas fa-tag fa-fw"></i>&nbsp;{{ humanize .Title }}
{{- else -}}
- {{- printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title -}}
+ {{- printf "%s - %s" (T $taxonomy | default (humanize $taxonomy)) .Title -}}
{{- end -}}
</h2>
{{- /* Paginate */ -}}
- {{- range (.Paginate (.Pages.GroupByDate "2006")).PageGroups -}}
+ {{- $pages := .Pages.GroupByDate "2006" -}}
+ {{- range (.Site.Params.list.paginate | default .Site.Params.paginate | .Paginate $pages).PageGroups -}}
<h3>{{ .Key }}</h3>
{{- range .Pages -}}
<article class="archive-item">
@@ -25,7 +26,7 @@
{{- .Title -}}
</a>
<span class="archive-item-date">
- {{- .Date.Format (.Site.Params.dateFormatToUse | default "01-02") -}}
+ {{- .Date.Format ($.Site.Params.list.dateFormat | default "01-02") -}}
</span>
</article>
{{- end -}}
diff --git a/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content b/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content
index 0790e9b..a2a002b 100644
--- a/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content
+++ b/resources/_gen/assets/scss/css/style.template.scss_b8ba9a60a151126bfcde1421dc0b972d.content
@@ -1,3 +1,3 @@
-@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@800&display=swap");html{font-family:system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;font-display:swap;font-size:16px;line-height:1.5rem;width:100%}::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background-color:#87878d}::-webkit-scrollbar-thumb:hover{background-color:#a9a9b3}::selection{background-color:rgba(53,166,247,0.25)}.dark ::selection{background-color:rgba(50,112,194,0.4)}body{background-color:#fff;color:#161209;overflow-wrap:break-word;scrollbar-color:auto}body.dark{color:#a9a9b3;background-color:#292a2d}#mask{background-repeat:no-repeat;background-position:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:-1;background-color:rgba(0,0,0,0)}.blur #mask{z-index:100;background-color:rgba(0,0,0,0.25)}a{text-decoration:none}a{color:#161209}.dark a{color:#a9a9b3}a:active,a:hover{color:#2d96bd}.dark a:active,.dark a:hover{color:#fff}#fixed-buttons{display:none}.fixed-button{display:none;z-index:100;position:fixed;right:1.5rem;font-size:1rem;line-height:1.3rem;padding:.6rem .6rem;color:#a9a9b3;background:#f8f8f8;border:1px solid #b1b1b1;-webkit-border-radius:2rem;-moz-border-radius:2rem;border-radius:2rem}.blur .fixed-button{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.fixed-button:hover,.fixed-button:active{color:#161209;cursor:pointer}.fixed-button:active,.fixed-button:focus,.fixed-button:hover{outline:none}.dark .fixed-button{color:#5d5d5f;background:#252627;border-color:#313236}.dark .fixed-button:hover,.dark .fixed-button:active{color:#a9a9b3}#back-to-top{display:block;bottom:1.5rem}#view-comments{bottom:4.5rem}.wrapper{display:flex;flex-direction:column;min-height:97.5vh;width:100%}.wrapper main{flex:1 0 auto}.wrapper main .container{padding-left:1rem;padding-right:1rem}.page{position:relative;width:100%;max-width:60%;margin:0 auto;padding-top:3.5rem}.blur .page{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}#toc-auto{display:block;position:absolute;width:1000px;padding:0 .8rem;border-left:1px solid #cacaca;overflow-wrap:break-word;box-sizing:border-box;top:10rem;left:10000px}.blur #toc-auto{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.dark #toc-auto{border-left:1px solid #4a4b50}#toc-auto .toc-title{font-weight:400;margin:.8rem 0;text-transform:uppercase}#toc-auto .toc-content.always-active ul{display:block}#toc-auto .toc-content>nav>ul{margin:.625rem 0}#toc-auto .toc-content ul{text-indent:-0.85rem;padding-left:.625rem;list-style:none}#toc-auto .toc-content ul a::before{content:"|";font-weight:bolder;margin-right:.5rem;color:#2d96bd}.dark #toc-auto .toc-content ul a::before{color:#55bde2}#toc-auto .toc-content ul ul{padding-left:1.25rem;display:none}#toc-auto .toc-content ul .has-active>ul{display:block}#toc-auto .toc-content a.active{font-weight:bold;color:#2d96bd}.dark #toc-auto .toc-content a.active{color:#55bde2}#toc-auto .toc-content a.active::before{color:#ef3982}.dark #toc-auto .toc-content a.active::before{color:#bdebfc}#toc-static{display:none;margin:.8rem 0}#toc-static details summary{list-style:none;background:#ededed}.dark #toc-static details summary{background:#20252b}#toc-static details summary .toc-title{display:block;display:flex;justify-content:space-between;font-weight:bold;line-height:2em;padding:0 .625rem}#toc-static details summary .toc-title i.details{line-height:2em}#toc-static details summary .toc-title:hover{cursor:pointer}#toc-static details summary::-webkit-details-marker{display:none}#toc-static details[open] i.details{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}#toc-static .toc-content{background-color:#f5f5f5}#toc-static .toc-content>nav>ul{margin:0;padding:.4rem .8rem}#toc-static .toc-content ul{list-style:none}#toc-static .toc-content ul ul{padding-left:1.25rem}.dark #toc-static .toc-content{background-color:#272C34}.toc .toc-title{font-size:1.2rem}.toc .toc-content{font-size:1rem}.toc ruby{background:#f5f5f5}.toc ruby rt{color:#a9a9b3}.dark .toc ruby{background:#272C34}.dark .toc ruby rt{color:#5d5d5f}.single .single-title{margin:1rem 0 .5rem;font-size:1.6rem;line-height:140%}.single .single-subtitle{margin:.4rem 0;font-size:1.2rem;font-weight:normal;font-style:italic;line-height:100%}.single .post-meta{font-size:.875rem;color:#a9a9b3}.single .post-meta span{display:inline-block}.dark .single .post-meta{color:#5d5d5f}.single .post-meta a{color:#2d96bd}.dark .single .post-meta a{color:#a9a9b3}.single .post-meta a:active,.single .post-meta a:hover{color:#ef3982}.dark .single .post-meta a:active,.dark .single .post-meta a:hover{color:#fff}.single .post-meta .author{font-size:1.05rem}.single .featured-image{margin:.5rem 0}.single .featured-image img{display:block;width:100%;height:auto;margin:0 auto;overflow:hidden}.single .content>h2{font-size:1.5rem}.single .content>h2 code{font-size:1.25rem}.single .content>h3{font-size:1.375rem}.single .content>h3 code{font-size:1.125rem}.single .content>h4{font-size:1.25rem}.single .content>h4 code{font-size:1rem}.single .content>h5{font-size:1.125rem}.single .content>h6{font-size:1rem}.single .content h2,.single .content h3,.single .content h4,.single .content h5,.single .content h6{font-weight:bold;margin:1.2rem 0}.dark .single .content h2,.dark .single .content h3,.dark .single .content h4,.dark .single .content h5,.dark .single .content h6{font-weight:bolder}.single .content>h2>.header-mark::before,.single .content>h3>.header-mark::before,.single .content>h4>.header-mark::before,.single .content>h5>.header-mark::before,.single .content>h6>.header-mark::before{content:"|";margin-right:.3125rem;color:#2d96bd}.dark .single .content>h2>.header-mark::before,.dark .single .content>h3>.header-mark::before,.dark .single .content>h4>.header-mark::before,.dark .single .content>h5>.header-mark::before,.dark .single .content>h6>.header-mark::before{color:#55bde2}.single .content>h2>.header-mark::before{content:"#"}.single .content p{margin:.5rem 0}.single .content b,.single .content strong{font-weight:bold}.dark .single .content b,.dark .single .content strong{color:#ddd}.single .content a{color:#2d96bd}.dark .single .content a{color:#55bde2}.single .content a:active,.single .content a:hover{color:#ef3982}.dark .single .content a:active,.dark .single .content a:hover{color:#bdebfc}.single .content a{word-break:break-all;word-break:break-word}.dark .single .content a b,.dark .single .content a strong{color:#55bde2}.single .content .dark a:hover b,.single .content .dark a:hover strong{color:#bdebfc}.single .content ul{margin:.5rem 0;padding-left:2rem;list-style-type:disc}.single .content ruby{background:#f5f5f5}.single .content ruby rt{color:#a9a9b3}.dark .single .content ruby{background:#272C34}.dark .single .content ruby rt{color:#5d5d5f}.single .content .table-wrapper{overflow-x:auto}.single .content .table-wrapper::-webkit-scrollbar{background-color:#fff}.dark .single .content .table-wrapper::-webkit-scrollbar{background-color:#272c34}.single .content .table-wrapper>table{width:100%;max-width:100%;margin:.625rem 0;border-spacing:0;background:#fff;border-collapse:collapse}.dark .single .content .table-wrapper>table{background:#272c34}.single .content .table-wrapper>table thead{background:#ededed}.dark .single .content .table-wrapper>table thead{background-color:#20252b}.single .content .table-wrapper>table th,.single .content .table-wrapper>table td{padding:.3rem 1rem;border:1px double #cacaca}.dark .single .content .table-wrapper>table th,.dark .single .content .table-wrapper>table td{border:1px double #4a4b50}.single .content img{max-width:100%;min-height:1.2rem}.single .content figure{text-align:center}.single .content figure .image-caption:not(:empty){min-width:20%;max-width:80%;display:inline-block;padding:.5rem;margin:0 auto;font-size:.875rem;color:#969696}.single .content figure img{display:block;height:auto;margin:0 auto;overflow:hidden}.single .content .lazyloading{object-fit:none}.single .content blockquote{font-size:1rem;display:block;border-width:1px 0;border-style:solid;border-color:#cacaca;padding:1.5em 1.2em 0.5em 1.2em;margin:0 0 2em 0;position:relative}.single .content blockquote::before{content:'\201C';position:absolute;top:0em;left:50%;-webkit-transform:translate(-50%, -50%);-moz-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);-o-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:3rem;height:2rem;font:6em/1.08em 'PT Sans', sans-serif;color:#2d96bd;text-align:center}.dark .single .content blockquote::before{color:#55bde2}.single .content blockquote::after{content:"#blockquote" attr(cite);display:block;text-align:right;font-size:0.875em;color:#2d96bd}.dark .single .content blockquote::after{color:#55bde2}.dark .single .content blockquote{border-color:#4a4b50}.single .content .footnotes{color:#a9a9b3}.dark .single .content .footnotes{color:#5d5d5f}.single .content .footnotes p{margin:.25rem 0}.single .content code{font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;color:#E74C3C}.single .content code img,.single .content code .version img{min-height:.9625rem;height:.9625rem}.dark .single .content code{color:#E5BF78}.single .content code:not(.block){padding:.2rem .4rem}.single .content pre{position:relative;margin:0;padding:.25rem 0 .25rem .5rem;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.single .content pre .copy-button{font-size:.875rem;line-height:.875rem;position:absolute;top:0;right:0;padding:.3rem .5rem;color:#b1b0b0;background:#ededed}.dark .single .content pre .copy-button{color:#b1b0b0;background:#20252b}.single .content pre .copy-button:hover,.single .content pre .copy-button:focus{cursor:pointer;color:#2d96bd}.dark .single .content pre .copy-button:hover,.dark .single .content pre .copy-button:focus{color:#fff}.single .content code,.single .content pre,.single .content .highlight table,.single .content .highlight tr,.single .content .highlight td{background:#f5f5f5}.dark .single .content code,.dark .single .content pre,.dark .single .content .highlight table,.dark .single .content .highlight tr,.dark .single .content .highlight td{background:#272C34}.single .content .highlight>.chroma table,.single .content .highlight>.chroma tr,.single .content .highlight>.chroma td,.single .content .gist table,.single .content .gist tr,.single .content .gist td{margin:0;padding:0;border:none !important;white-space:nowrap}.single .content .highlight>.chroma{position:relative;margin:.5rem 0}.single .content .highlight>.chroma pre{position:unset}.single .content .highlight>.chroma::before{display:block;padding:.3rem .4rem;font-family:system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;color:#b1b0b0;background:#ededed;content:'Code'}.dark .single .content .highlight>.chroma::before{color:#b1b0b0;background:#20252b}.single .content .highlight>.chroma.language-bash::before{content:"Bash"}.single .content .highlight>.chroma.language-c::before{content:"C"}.single .content .highlight>.chroma.language-cs::before{content:"C#"}.single .content .highlight>.chroma.language-cpp::before{content:"C++"}.single .content .highlight>.chroma.language-clojure::before{content:"Clojure"}.single .content .highlight>.chroma.language-coffeescript::before{content:"CoffeeScript"}.single .content .highlight>.chroma.language-css::before{content:"CSS"}.single .content .highlight>.chroma.language-dart::before{content:"Dart"}.single .content .highlight>.chroma.language-diff::before{content:"Diff"}.single .content .highlight>.chroma.language-erlang::before{content:"Erlang"}.single .content .highlight>.chroma.language-go::before{content:"Go"}.single .content .highlight>.chroma.language-go-html-template::before{content:"Go HTML Template"}.single .content .highlight>.chroma.language-groovy::before{content:"Groovy"}.single .content .highlight>.chroma.language-haskell::before{content:"Haskell"}.single .content .highlight>.chroma.language-html::before{content:"HTML"}.single .content .highlight>.chroma.language-http::before{content:"HTTP"}.single .content .highlight>.chroma.language-xml::before{content:"XML"}.single .content .highlight>.chroma.language-java::before{content:"Java"}.single .content .highlight>.chroma.language-js::before{content:"JavaScript"}.single .content .highlight>.chroma.language-javascript::before{content:"JavaScript"}.single .content .highlight>.chroma.language-json::before{content:"JSON"}.single .content .highlight>.chroma.language-kotlin::before{content:"Kotlin"}.single .content .highlight>.chroma.language-latex::before{content:"LaTeX"}.single .content .highlight>.chroma.language-less::before{content:"Less"}.single .content .highlight>.chroma.language-lisp::before{content:"Lisp"}.single .content .highlight>.chroma.language-lua::before{content:"Lua"}.single .content .highlight>.chroma.language-makefile::before{content:"Makefile"}.single .content .highlight>.chroma.language-markdown::before{content:"Markdown"}.single .content .highlight>.chroma.language-matlab::before{content:"Matlab"}.single .content .highlight>.chroma.language-objectivec::before{content:"Objective-C"}.single .content .highlight>.chroma.language-php::before{content:"PHP"}.single .content .highlight>.chroma.language-perl::before{content:"Perl"}.single .content .highlight>.chroma.language-python::before{content:"Python"}.single .content .highlight>.chroma.language-r::before{content:"R"}.single .content .highlight>.chroma.language-ruby::before{content:"Ruby"}.single .content .highlight>.chroma.language-rust::before{content:"Rust"}.single .content .highlight>.chroma.language-scala::before{content:"Scala"}.single .content .highlight>.chroma.language-scss::before{content:"Scss"}.single .content .highlight>.chroma.language-shell::before{content:"Shell"}.single .content .highlight>.chroma.language-sql::before{content:"SQL"}.single .content .highlight>.chroma.language-swift::before{content:"Swift"}.single .content .highlight>.chroma.language-tex::before{content:"TeX"}.single .content .highlight>.chroma.language-toml::before{content:"TOML"}.single .content .highlight>.chroma.language-ts::before{content:"TypeScript"}.single .content .highlight>.chroma.language-typescript::before{content:"TypeScript"}.single .content .highlight>.chroma.language-vue::before{content:"Vue"}.single .content .highlight>.chroma.language-yml::before{content:"YAML"}.single .content .highlight>.chroma.language-yaml::before{content:"YAML"}.single .content .highlight>.chroma .lntd:last-child{width:100%}.single .content .highlight>.chroma .lntd:last-child pre{padding-left:.75rem;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:intrinsic;min-width:max-content}.single .content .highlight>.chroma .ln{padding-right:.75rem}.single .content .highlight>.chroma .hl{display:block;background-color:#dcdcdc}.dark .single .content .highlight>.chroma .hl{background-color:#1c2025}.single .content .highlight>.chroma .ln,.single .content .highlight>.chroma .lnt{color:#a9a9b3}.dark .single .content .highlight>.chroma .ln,.dark .single .content .highlight>.chroma .lnt{color:#5d5d5f}.single .content .highlight{font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;font-size:.875rem;line-height:1rem}.single .content .highlight .c,.single .content .highlight .ch,.single .content .highlight .cm,.single .content .highlight .c1,.single .content .highlight .cs,.single .content .highlight .cp,.single .content .highlight .cpf{font-style:italic}.single .content .highlight .gl{text-decoration:underline}.single .content .highlight .p{color:#a9a9b3}.single .content .highlight .k{color:#b501a9}.single .content .highlight .kc{color:#b501a9}.single .content .highlight .kd{color:#b501a9}.single .content .highlight .kn{color:#b501a9}.single .content .highlight .kp{color:#b501a9}.single .content .highlight .kr{color:#b501a9}.single .content .highlight .kt{color:#b501a9}.single .content .highlight .n{color:#333}.single .content .highlight .na{color:#2b77fa}.single .content .highlight .nb{color:#f74840}.single .content .highlight .bp{color:#f74840}.single .content .highlight .nc{color:#cb8100}.single .content .highlight .no{color:#2b77fa}.single .content .highlight .nd{color:#0086c1}.single .content .highlight .ni{color:#2b77fa}.single .content .highlight .ne{color:#2b77fa}.single .content .highlight .nf{color:#2b77fa}.single .content .highlight .fm{color:#1ccad6}.single .content .highlight .nl{color:#2b77fa}.single .content .highlight .nn{color:#2b77fa}.single .content .highlight .nx{color:#333}.single .content .highlight .py{color:#2b77fa}.single .content .highlight .nt{color:#2b77fa}.single .content .highlight .nv{color:#2b77fa}.single .content .highlight .vc{color:#2b77fa}.single .content .highlight .vg{color:#2b77fa}.single .content .highlight .vi{color:#2b77fa}.single .content .highlight .vm{color:#2b77fa}.single .content .highlight .l{color:#2aa198}.single .content .highlight .ld{color:#2aa198}.single .content .highlight .s{color:#24a443}.single .content .highlight .sa{color:#24a443}.single .content .highlight .sb{color:#24a443}.single .content .highlight .sc{color:#24a443}.single .content .highlight .dl{color:#24a443}.single .content .highlight .sd{color:#24a443}.single .content .highlight .s2{color:#24a443}.single .content .highlight .se{color:#24a443}.single .content .highlight .sh{color:#24a443}.single .content .highlight .si{color:#24a443}.single .content .highlight .sx{color:#24a443}.single .content .highlight .sr{color:#24a443}.single .content .highlight .s1{color:#24a443}.single .content .highlight .ss{color:#24a443}.single .content .highlight .m{color:#e2893c}.single .content .highlight .mb{color:#e2893c}.single .content .highlight .mf{color:#e2893c}.single .content .highlight .mh{color:#e2893c}.single .content .highlight .mi{color:#e2893c}.single .content .highlight .il{color:#e2893c}.single .content .highlight .mo{color:#e2893c}.single .content .highlight .o{color:#f19b04}.single .content .highlight .ow{color:#b501a9}.single .content .highlight .c{color:#a0a1a8}.single .content .highlight .ch{color:#a0a1a8}.single .content .highlight .cm{color:#a0a1a8}.single .content .highlight .c1{color:#a0a1a8}.single .content .highlight .cs{color:#a0a1a8}.single .content .highlight .cp{color:#a0a1a8}.single .content .highlight .cpf{color:#a0a1a8}.single .content .highlight .g{color:#e72d40}.single .content .highlight .gd{color:#e72d40}.single .content .highlight .ge{color:#e72d40}.single .content .highlight .gr{color:#e72d40}.single .content .highlight .gh{color:#e72d40}.single .content .highlight .gi{color:#e72d40}.single .content .highlight .go{color:#e72d40}.single .content .highlight .gp{color:#e72d40}.single .content .highlight .gs{color:#e72d40}.single .content .highlight .gu{color:#e72d40}.single .content .highlight .gt{color:#e72d40}.single .content .highlight .w{color:#bbb}.dark .single .content .highlight .p{color:#a9a9b3}.dark .single .content .highlight .k{color:#d371e3}.dark .single .content .highlight .kc{color:#d371e3}.dark .single .content .highlight .kd{color:#d371e3}.dark .single .content .highlight .kn{color:#d371e3}.dark .single .content .highlight .kp{color:#d371e3}.dark .single .content .highlight .kr{color:#d371e3}.dark .single .content .highlight .kt{color:#d371e3}.dark .single .content .highlight .n{color:#a9b2c0}.dark .single .content .highlight .na{color:#41b0f5}.dark .single .content .highlight .nb{color:#19b9c4}.dark .single .content .highlight .bp{color:#ecbf6f}.dark .single .content .highlight .nc{color:#ecbf6f}.dark .single .content .highlight .no{color:#41b0f5}.dark .single .content .highlight .nd{color:#ecbf6f}.dark .single .content .highlight .ni{color:#41b0f5}.dark .single .content .highlight .ne{color:#41b0f5}.dark .single .content .highlight .nf{color:#41b0f5}.dark .single .content .highlight .fm{color:#19b9c4}.dark .single .content .highlight .nl{color:#41b0f5}.dark .single .content .highlight .nn{color:#41b0f5}.dark .single .content .highlight .nx{color:#a9a9b3}.dark .single .content .highlight .py{color:#41b0f5}.dark .single .content .highlight .nt{color:#41b0f5}.dark .single .content .highlight .nv{color:#41b0f5}.dark .single .content .highlight .vc{color:#41b0f5}.dark .single .content .highlight .vg{color:#41b0f5}.dark .single .content .highlight .vi{color:#41b0f5}.dark .single .content .highlight .vm{color:#41b0f5}.dark .single .content .highlight .l{color:#2aa198}.dark .single .content .highlight .ld{color:#2aa198}.dark .single .content .highlight .s{color:#8cc570}.dark .single .content .highlight .sa{color:#8cc570}.dark .single .content .highlight .sb{color:#8cc570}.dark .single .content .highlight .sc{color:#8cc570}.dark .single .content .highlight .dl{color:#8cc570}.dark .single .content .highlight .sd{color:#8cc570}.dark .single .content .highlight .s2{color:#8cc570}.dark .single .content .highlight .se{color:#8cc570}.dark .single .content .highlight .sh{color:#8cc570}.dark .single .content .highlight .si{color:#8cc570}.dark .single .content .highlight .sx{color:#8cc570}.dark .single .content .highlight .sr{color:#8cc570}.dark .single .content .highlight .s1{color:#8cc570}.dark .single .content .highlight .ss{color:#8cc570}.dark .single .content .highlight .m{color:#db985c}.dark .single .content .highlight .mb{color:#db985c}.dark .single .content .highlight .mf{color:#db985c}.dark .single .content .highlight .mh{color:#db985c}.dark .single .content .highlight .mi{color:#db985c}.dark .single .content .highlight .il{color:#db985c}.dark .single .content .highlight .mo{color:#db985c}.dark .single .content .highlight .o{color:#ecbf6f}.dark .single .content .highlight .ow{color:#d371e3}.dark .single .content .highlight .c{color:#7e848f}.dark .single .content .highlight .ch{color:#7e848f}.dark .single .content .highlight .cm{color:#7e848f}.dark .single .content .highlight .c1{color:#7e848f}.dark .single .content .highlight .cs{color:#7e848f}.dark .single .content .highlight .cp{color:#7e848f}.dark .single .content .highlight .cpf{color:#7e848f}.dark .single .content .highlight .g{color:#f16372}.dark .single .content .highlight .gd{color:#f16372}.dark .single .content .highlight .ge{color:#f16372}.dark .single .content .highlight .gr{color:#f16372}.dark .single .content .highlight .gh{color:#f16372}.dark .single .content .highlight .gi{color:#f16372}.dark .single .content .highlight .go{color:#f16372}.dark .single .content .highlight .gp{color:#f16372}.dark .single .content .highlight .gs{color:#f16372}.dark .single .content .highlight .gu{color:#f16372}.dark .single .content .highlight .gt{color:#f16372}.dark .single .content .highlight .w{color:#bbb}.single .content .gist .gist-file,.single .content .gist .gist-data,.single .content .gist .gist-meta{border:none}.single .content .gist .gist-meta{padding:.4rem .8rem;background-color:#e8e8e8}.single .content .gist .gist-meta a{color:#2d96bd}.dark .single .content .gist .gist-meta a{color:#55bde2}.single .content .gist .gist-meta a:active,.single .content .gist .gist-meta a:hover{color:#ef3982}.dark .single .content .gist .gist-meta a:active,.dark .single .content .gist .gist-meta a:hover{color:#bdebfc}.dark .single .content .gist .gist-meta{background-color:#1c2025}.dark .single .content .gist .highlight{background:#141414}.dark .single .content .gist .blob-num,.dark .single .content .gist .blob-code-inner,.dark .single .content .gist .highlight,.dark .single .content .gist .pl-enm,.dark .single .content .gist .pl-ko,.dark .single .content .gist .pl-mo,.dark .single .content .gist .pl-mp1 .pl-sf,.dark .single .content .gist .pl-ms,.dark .single .content .gist .pl-pdc1,.dark .single .content .gist .pl-scp,.dark .single .content .gist .pl-smc,.dark .single .content .gist .pl-som,.dark .single .content .gist .pl-va,.dark .single .content .gist .pl-vpf,.dark .single .content .gist .pl-vpu,.dark .single .content .gist .pl-mdr{color:#aab1bf}.dark .single .content .gist .pl-mb,.dark .single .content .gist .pl-pdb{font-weight:700}.dark .single .content .gist .pl-c,.dark .single .content .gist .pl-c span,.dark .single .content .gist .pl-pdc{color:#5b6270;font-style:italic}.dark .single .content .gist .pl-sr .pl-cce{color:#56b5c2;font-weight:400}.dark .single .content .gist .pl-ef,.dark .single .content .gist .pl-en,.dark .single .content .gist .pl-enf,.dark .single .content .gist .pl-eoai,.dark .single .content .gist .pl-kos,.dark .single .content .gist .pl-mh .pl-pdh,.dark .single .content .gist .pl-mr{color:#61afef}.dark .single .content .gist .pl-ens,.dark .single .content .gist .pl-vi{color:#be5046}.dark .single .content .gist .pl-enti,.dark .single .content .gist .pl-mai .pl-sf,.dark .single .content .gist .pl-ml,.dark .single .content .gist .pl-sf,.dark .single .content .gist .pl-sr,.dark .single .content .gist .pl-sr .pl-sra,.dark .single .content .gist .pl-src,.dark .single .content .gist .pl-st,.dark .single .content .gist .pl-vo{color:#56b5c2}.dark .single .content .gist .pl-eoi,.dark .single .content .gist .pl-mri,.dark .single .content .gist .pl-pds,.dark .single .content .gist .pl-pse .pl-s1,.dark .single .content .gist .pl-s,.dark .single .content .gist .pl-s1{color:#97c279}.dark .single .content .gist .pl-k,.dark .single .content .gist .pl-kolp,.dark .single .content .gist .pl-mc,.dark .single .content .gist .pl-pde{color:#c578dd}.dark .single .content .gist .pl-mi,.dark .single .content .gist .pl-pdi{color:#c578dd;font-style:italic}.dark .single .content .gist .pl-mp,.dark .single .content .gist .pl-stp{color:#818896}.dark .single .content .gist .pl-mdh,.dark .single .content .gist .pl-mdi,.dark .single .content .gist .pl-mdr{font-weight:400}.dark .single .content .gist .pl-mdht,.dark .single .content .gist .pl-mi1{color:#97c279;background:#020}.dark .single .content .gist .pl-md,.dark .single .content .gist .pl-mdhf{color:#df6b75;background:#200}.dark .single .content .gist .pl-corl{color:#df6b75;text-decoration:underline}.dark .single .content .gist .pl-ib{background:#df6b75}.dark .single .content .gist .pl-ii{background:#e0c184;color:#fff}.dark .single .content .gist .pl-iu{background:#e05151}.dark .single .content .gist .pl-ms1{color:#aab1bf;background:#373b41}.dark .single .content .gist .pl-c1,.dark .single .content .gist .pl-cn,.dark .single .content .gist .pl-e,.dark .single .content .gist .pl-eoa,.dark .single .content .gist .pl-eoac,.dark .single .content .gist .pl-eoac .pl-pde,.dark .single .content .gist .pl-kou,.dark .single .content .gist .pl-mm,.dark .single .content .gist .pl-mp .pl-s3,.dark .single .content .gist .pl-mq,.dark .single .content .gist .pl-s3,.dark .single .content .gist .pl-sok,.dark .single .content .gist .pl-sv,.dark .single .content .gist .pl-mb{color:#d19965}.dark .single .content .gist .pl-enc,.dark .single .content .gist .pl-entc,.dark .single .content .gist .pl-pse .pl-s2,.dark .single .content .gist .pl-s2,.dark .single .content .gist .pl-sc,.dark .single .content .gist .pl-smp,.dark .single .content .gist .pl-sr .pl-sre,.dark .single .content .gist .pl-stj,.dark .single .content .gist .pl-v,.dark .single .content .gist .pl-pdb{color:#e4bf7a}.dark .single .content .gist .pl-ent,.dark .single .content .gist .pl-entl,.dark .single .content .gist .pl-entm,.dark .single .content .gist .pl-mh,.dark .single .content .gist .pl-pdv,.dark .single .content .gist .pl-smi,.dark .single .content .gist .pl-sol,.dark .single .content .gist .pl-mdh,.dark .single .content .gist .pl-mdi{color:#df6b75}.dark .single .content iframe.instagram-media{border:none !important}.single .content .admonition{position:relative;margin:.9765em 0;padding:0 .75rem;background-color:rgba(68,138,255,0.1);border-left:0.25rem solid #448aff;overflow:auto}.single .content .admonition .admonition-title{margin:0 -0.75rem;padding:.2rem .75rem .2rem 1.8rem;border-bottom:0.05rem solid rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition .admonition-content{margin:.5rem 0}.single .content .admonition i.icon{font-size:0.85rem;color:#448aff;cursor:auto;position:absolute;left:.6rem;top:.6rem}.single .content .admonition.note{border-left-color:#448aff}.single .content .admonition.note i.icon{color:#448aff}.single .content .admonition.abstract{border-left-color:#00b0ff}.single .content .admonition.abstract i.icon{color:#00b0ff}.single .content .admonition.info{border-left-color:#00b8d4}.single .content .admonition.info i.icon{color:#00b8d4}.single .content .admonition.tip{border-left-color:#00bfa5}.single .content .admonition.tip i.icon{color:#00bfa5}.single .content .admonition.success{border-left-color:#00c853}.single .content .admonition.success i.icon{color:#00c853}.single .content .admonition.question{border-left-color:#64dd17}.single .content .admonition.question i.icon{color:#64dd17}.single .content .admonition.warning{border-left-color:#ff9100}.single .content .admonition.warning i.icon{color:#ff9100}.single .content .admonition.failure{border-left-color:#ff5252}.single .content .admonition.failure i.icon{color:#ff5252}.single .content .admonition.danger{border-left-color:#ff1744}.single .content .admonition.danger i.icon{color:#ff1744}.single .content .admonition.bug{border-left-color:#f50057}.single .content .admonition.bug i.icon{color:#f50057}.single .content .admonition.example{border-left-color:#651fff}.single .content .admonition.example i.icon{color:#651fff}.single .content .admonition.quote{border-left-color:#9e9e9e}.single .content .admonition.quote i.icon{color:#9e9e9e}.single .content .admonition.note{background-color:rgba(68,138,255,0.1)}.single .content .admonition.note .admonition-title{border-bottom-color:rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition.abstract{background-color:rgba(0,176,255,0.1)}.single .content .admonition.abstract .admonition-title{border-bottom-color:rgba(0,176,255,0.1);background-color:rgba(0,176,255,0.1)}.single .content .admonition.info{background-color:rgba(0,184,212,0.1)}.single .content .admonition.info .admonition-title{border-bottom-color:rgba(0,184,212,0.1);background-color:rgba(0,184,212,0.1)}.single .content .admonition.tip{background-color:rgba(0,191,165,0.1)}.single .content .admonition.tip .admonition-title{border-bottom-color:rgba(0,191,165,0.1);background-color:rgba(0,191,165,0.1)}.single .content .admonition.success{background-color:rgba(0,200,83,0.1)}.single .content .admonition.success .admonition-title{border-bottom-color:rgba(0,200,83,0.1);background-color:rgba(0,200,83,0.1)}.single .content .admonition.question{background-color:rgba(100,221,23,0.1)}.single .content .admonition.question .admonition-title{border-bottom-color:rgba(100,221,23,0.1);background-color:rgba(100,221,23,0.1)}.single .content .admonition.warning{background-color:rgba(255,145,0,0.1)}.single .content .admonition.warning .admonition-title{border-bottom-color:rgba(255,145,0,0.1);background-color:rgba(255,145,0,0.1)}.single .content .admonition.failure{background-color:rgba(255,82,82,0.1)}.single .content .admonition.failure .admonition-title{border-bottom-color:rgba(255,82,82,0.1);background-color:rgba(255,82,82,0.1)}.single .content .admonition.danger{background-color:rgba(255,23,68,0.1)}.single .content .admonition.danger .admonition-title{border-bottom-color:rgba(255,23,68,0.1);background-color:rgba(255,23,68,0.1)}.single .content .admonition.bug{background-color:rgba(245,0,87,0.1)}.single .content .admonition.bug .admonition-title{border-bottom-color:rgba(245,0,87,0.1);background-color:rgba(245,0,87,0.1)}.single .content .admonition.example{background-color:rgba(101,31,255,0.1)}.single .content .admonition.example .admonition-title{border-bottom-color:rgba(101,31,255,0.1);background-color:rgba(101,31,255,0.1)}.single .content .admonition.quote{background-color:rgba(158,158,158,0.1)}.single .content .admonition.quote .admonition-title{border-bottom-color:rgba(158,158,158,0.1);background-color:rgba(158,158,158,0.1)}.single .content .admonition:last-child{margin-bottom:.75rem}.single .content details.admonition summary{display:block;outline:none;cursor:pointer}.single .content details.admonition summary::-webkit-details-marker{display:none}.single .content details.admonition summary i.details{position:absolute;top:.5rem;right:.5rem;color:#161209}.dark .single .content details.admonition summary i.details{color:#a9a9b3}.single .content details.admonition[open] i.details{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.single .content .echarts{margin:.5rem 0;text-align:center}.single .content .mapbox{margin:.5rem 0;padding:.5rem 0}.single .content meting-js{margin:.5rem 0}.single .content .bilibili{position:relative;width:100%;height:0;padding-bottom:75%;margin:3% auto;text-align:center}.single .content .bilibili iframe{position:absolute;width:100%;height:100%;left:0;top:0}.single .content hr{margin:1rem 0;position:relative;border-top:1px dashed #cacaca;border-bottom:none}.dark .single .content hr{border-top:1px dashed #4a4b50}.single .content kbd{display:inline-block;padding:.25rem;background-color:#fff;border:1px solid #cacaca;border-bottom-color:#cacaca;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 #cacaca;box-shadow:inset 0 -1px 0 #cacaca;font-size:.8rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;color:#E74C3C}.dark .single .content kbd{background-color:#292a2d;border:1px solid #4a4b50;border-bottom-color:#4a4b50;-webkit-box-shadow:inset 0 -1px 0 #4a4b50;box-shadow:inset 0 -1px 0 #4a4b50;color:#E5BF78}.single .content .typeit .code{padding:.375rem;font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace;font-weight:bold;word-break:break-all}.single .content .version img{min-height:1.2rem;height:1.2rem;vertical-align:text-bottom}.single .post-footer{margin-top:3rem}.single .post-footer .post-info{border-bottom:1px solid #cacaca;padding:1rem 0 0.3rem}.dark .single .post-footer .post-info{border-bottom:1px solid #4a4b50}.single .post-footer .post-info .post-info-line{display:flex;justify-content:space-between}.single .post-footer .post-info .post-info-line .post-info-mod{font-size:0.8em;color:#a9a9b3}.dark .single .post-footer .post-info .post-info-line .post-info-mod{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-mod a{color:#2d96bd}.dark .single .post-footer .post-info .post-info-line .post-info-mod a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-mod a:active,.single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#ef3982}.dark .single .post-footer .post-info .post-info-line .post-info-mod a:active,.dark .single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#bdebfc}.single .post-footer .post-info .post-info-line .post-info-license{font-size:0.8em;color:#a9a9b3}.dark .single .post-footer .post-info .post-info-line .post-info-license{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-md{font-size:0.8rem;width:8rem}.single .post-footer .post-info .post-info-line .post-info-md a{color:#2d96bd}.dark .single .post-footer .post-info .post-info-line .post-info-md a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-md a:active,.single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#ef3982}.dark .single .post-footer .post-info .post-info-line .post-info-md a:active,.dark .single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#bdebfc}.single .post-footer .post-info-more{padding:0.3rem 0 1rem;display:flex;justify-content:space-between;font-size:0.9rem}.single .post-footer .post-tags{max-width:65%}.single .post-footer .post-tags *{display:inline}.single .post-footer .post-nav::before,.single .post-footer .post-nav::after{content:' ';display:table}.single .post-footer .post-nav a.prev,.single .post-footer .post-nav a.next{font-size:1rem;font-weight:600;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.single .post-footer .post-nav a.prev{float:left}.single .post-footer .post-nav a.prev:hover{-webkit-transform:translateX(-4px);-moz-transform:translateX(-4px);-ms-transform:translateX(-4px);-o-transform:translateX(-4px);transform:translateX(-4px)}.single .post-footer .post-nav a.next{float:right}.single .post-footer .post-nav a.next:hover{-webkit-transform:translateX(4px);-moz-transform:translateX(4px);-ms-transform:translateX(4px);-o-transform:translateX(4px);transform:translateX(4px)}.single .comment{padding:4rem 0}.special .single-title,.special .single-subtitle{text-align:right}.archive .single-title{text-align:right}.archive .archive-item{margin-left:2rem}.archive .categories-card{margin:0 auto;margin-top:3rem;display:flex;align-items:center;justify-content:space-between;flex-direction:row;flex-wrap:wrap;padding:0 2.5rem;line-height:1.6rem}.archive .categories-card .card-item{font-size:.875rem;text-align:left;width:45%;display:flex;align-items:flex-start;margin-top:2rem;min-height:10rem;padding:0 2%;position:relative}.archive .categories-card .card-item .card-item-wrapper{width:100%;overflow:hidden}.archive .categories-card .card-item .card-item-wrapper .card-item-title{font-size:1.2rem;font-weight:bold;display:inline-block}.archive .categories-card .card-item .card-item-wrapper span{float:right;padding-right:1rem}.archive .archive-item-link{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:95%}.archive .archive-item-link:hover{color:#2d96bd;background-color:transparent}.dark .archive .archive-item-link{color:#a9a9b3}.dark .archive .archive-item-link:hover{color:#fff}.archive .archive-item-date{float:right;text-align:right;color:#a9a9b3}.dark .archive .archive-item-date{color:#5d5d5f}.archive .more-post{text-align:right}.archive .tag-cloud-tags{margin:10px 0}.archive .tag-cloud-tags a{color:#161209}.dark .archive .tag-cloud-tags a{color:#a9a9b3}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:hover{color:#2d96bd}.dark .archive .tag-cloud-tags a:active,.dark .archive .tag-cloud-tags a:hover{color:#fff}.archive .tag-cloud-tags a{display:inline-block;position:relative;margin:5px 10px;overflow-wrap:break-word;-webkit-transition:all ease-out 0.3s;-moz-transition:all ease-out 0.3s;-o-transition:all ease-out 0.3s;transition:all ease-out 0.3s}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:focus,.archive .tag-cloud-tags a:hover{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}.archive .tag-cloud-tags a sup{color:#a9a9b3}.dark .archive .tag-cloud-tags a sup{color:#5d5d5f}.home .home-profile{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0);padding:2rem 0 0.5rem;text-align:center}.home .home-profile .home-avatar{padding:0.6rem}.home .home-profile .home-avatar img{display:inline-block;width:6rem;height:auto;margin:0 auto;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;-webkit-box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);-webkit-transition:all 0.4s ease;-moz-transition:all 0.4s ease;-o-transition:all 0.4s ease;transition:all 0.4s ease;cursor:pointer}.home .home-profile .home-avatar img:hover{position:relative;-webkit-transform:translateY(-0.75rem);-moz-transform:translateY(-0.75rem);-ms-transform:translateY(-0.75rem);-o-transform:translateY(-0.75rem);transform:translateY(-0.75rem);cursor:pointer}.home .home-profile .home-subtitle{font-size:1rem;font-weight:normal;margin:0;padding:.4rem}.home .home-profile .social-links{padding:.4rem 0}.home .home-profile .social-links a,.home .home-profile .social-links i{font-size:1.6rem;line-height:2rem}.home .home-profile .social-links img{height:1.4rem;padding:0 .25rem}.home .home-profile .home-disclaimer{font-size:1rem;line-height:1.4rem;font-weight:normal;margin:0;padding:.4rem;color:#a9a9b3}.dark .home .home-profile .home-disclaimer{color:#5d5d5f}.home .summary{padding-top:1rem;padding-bottom:.8rem;color:#161209;border-bottom:1px dashed #cacaca}.dark .home .summary{color:#a9a9b3;border-bottom:1px dashed #4a4b50}.home .summary .featured-image-preview{width:100%;padding:30% 0 0;position:relative;margin:0.6rem auto}.home .summary .featured-image-preview img{position:absolute;width:100%;height:100%;left:0;top:0;object-fit:cover}.home .summary .single-title{font-size:1.4rem;line-height:140%;margin:0.4rem 0}.home .summary .content{display:-moz-box;display:-webkit-box;display:box;-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:3;margin-top:.3rem;width:100%;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark .home .summary .content{color:#5d5d5f}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6,.home .summary .content p{font-size:1rem;display:inline}.home .summary .content h2::after,.home .summary .content h3::after,.home .summary .content h4::after,.home .summary .content h5::after,.home .summary .content h6::after,.home .summary .content p::after{content:"\A";white-space:pre}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6{line-height:2}.home .summary .content h2::before,.home .summary .content h3::before,.home .summary .content h4::before,.home .summary .content h5::before,.home .summary .content h6::before{content:"|";margin-right:.3125rem;color:#161209}.dark .home .summary .content h2::before,.dark .home .summary .content h3::before,.dark .home .summary .content h4::before,.dark .home .summary .content h5::before,.dark .home .summary .content h6::before{color:#a9a9b3}.home .summary .content h2{font-size:1.2rem}.home .summary .content h2::before{content:"#"}.home .summary .content a{color:#161209}.dark .home .summary .content a{color:#a9a9b3}.home .summary .content a:active,.home .summary .content a:hover{color:#2d96bd}.dark .home .summary .content a:active,.dark .home .summary .content a:hover{color:#fff}.dark .home .summary .content b,.dark .home .summary .content strong{color:#5d5d5f}.home .summary .post-footer{margin-top:.4rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem}.home .summary .post-footer a{color:#2d96bd}.dark .home .summary .post-footer a{color:#55bde2}.home .summary .post-footer a:active,.home .summary .post-footer a:hover{color:#ef3982}.dark .home .summary .post-footer a:active,.dark .home .summary .post-footer a:hover{color:#bdebfc}.home .summary .post-footer .post-tags{padding:0}.home .summary .post-footer .post-tags a{color:#161209}.dark .home .summary .post-footer .post-tags a{color:#a9a9b3}.home .summary .post-footer .post-tags a:active,.home .summary .post-footer .post-tags a:hover{color:#2d96bd}.dark .home .summary .post-footer .post-tags a:active,.dark .home .summary .post-footer .post-tags a:hover{color:#fff}#content-404{font-size:1.8rem;line-height:3rem;-webkit-transform:translateY(30vh);-moz-transform:translateY(30vh);-ms-transform:translateY(30vh);-o-transform:translateY(30vh);transform:translateY(30vh);text-align:center}header{width:100%;z-index:150;background-color:#f8f8f8}.dark header{background-color:#252627}.header-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%}.header-title{font-family:"Nunito",system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;margin-right:.5rem;min-width:10%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-flex:10;flex:10}.menu .menu-item{position:relative}.language-select{position:absolute;opacity:0;left:0;top:0;width:100%;height:100%}.language-select:hover{cursor:pointer}.search{position:relative}.search input{color:transparent;box-sizing:border-box;height:2.5rem;width:2.5rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;border-radius:.5rem;border:none;outline:none;background-color:#f8f8f8;vertical-align:baseline !important;-webkit-transition:width 0.3s ease 0s;-moz-transition:width 0.3s ease 0s;-o-transition:width 0.3s ease 0s;transition:width 0.3s ease 0s}.dark .search input{background-color:#252627}.search input::-webkit-input-placeholder{color:rgba(0,0,0,0)}.search input:-moz-placeholder{color:rgba(0,0,0,0)}.search input::-moz-placeholder{color:rgba(0,0,0,0)}.search input:-ms-input-placeholder{color:rgba(0,0,0,0)}.search input::placeholder{color:rgba(0,0,0,0)}.search .search-button{margin:0;position:absolute;left:auto;right:1rem}.search .search-toggle{left:.5rem;right:auto}.search .search-loading{display:none}.search .search-clear{display:none}.open .search input,.search.mobile input{color:#161209;background-color:#e9e9e9;padding:0 2rem 0 2rem}.dark .open .search input,.dark .search.mobile input{color:#a9a9b3;background-color:#363636}.dark .open .search input::-webkit-input-placeholder,.dark .search.mobile input::-webkit-input-placeholder{color:#5d5d5f}.dark .open .search input:-moz-placeholder,.dark .search.mobile input:-moz-placeholder{color:#5d5d5f}.dark .open .search input::-moz-placeholder,.dark .search.mobile input::-moz-placeholder{color:#5d5d5f}.dark .open .search input:-ms-input-placeholder,.dark .search.mobile input:-ms-input-placeholder{color:#5d5d5f}.dark .open .search input::placeholder,.dark .search.mobile input::placeholder{color:#5d5d5f}.open .search input::-webkit-input-placeholder,.search.mobile input::-webkit-input-placeholder{color:#a9a9b3}.open .search input:-moz-placeholder,.search.mobile input:-moz-placeholder{color:#a9a9b3}.open .search input::-moz-placeholder,.search.mobile input::-moz-placeholder{color:#a9a9b3}.open .search input:-ms-input-placeholder,.search.mobile input:-ms-input-placeholder{color:#a9a9b3}.open .search input::placeholder,.search.mobile input::placeholder{color:#a9a9b3}.open .search .search-button,.search.mobile .search-button{color:#a9a9b3}.dark .open .search .search-button,.dark .search.mobile .search-button{color:#5d5d5f}.open .search .search-clear:hover,.search.mobile .search-clear:hover{color:#ff6b6b}.open .search .search-toggle:hover,.search.mobile .search-toggle:hover{cursor:default}.theme-switch i{-webkit-transform:rotate(225deg);-moz-transform:rotate(225deg);-ms-transform:rotate(225deg);-o-transform:rotate(225deg);transform:rotate(225deg)}#header-desktop{display:block;position:fixed;height:3.5rem;line-height:3.5rem}#header-desktop .header-wrapper{padding:0 1.5rem}#header-desktop .header-wrapper .header-title{font-size:1.5rem}#header-desktop .header-wrapper .menu{overflow:hidden;white-space:nowrap}#header-desktop .header-wrapper .menu .menu-inner{float:right}#header-desktop .header-wrapper .menu .menu-item{margin:0 .5rem}#header-desktop .header-wrapper .menu .menu-item.delimiter{border-left:1.5px solid #161209}.dark #header-desktop .header-wrapper .menu .menu-item.delimiter{border-left-color:#4a4b50}#header-desktop .header-wrapper .menu .menu-item.language{margin-right:0}#header-desktop .header-wrapper .menu .menu-item.search{margin:0 -.5rem 0 0}#header-desktop .header-wrapper .menu a.active{font-weight:900;color:#161209}.dark #header-desktop .header-wrapper .menu a.active{color:#fff}#header-desktop.open .header-wrapper .menu .menu-item.search{margin:0 .25rem 0 .5rem}#header-desktop.open .header-wrapper .menu .menu-item.search input{width:24rem}#header-mobile{display:none;position:fixed;height:3.5rem;line-height:3.5rem}#header-mobile .header-container{padding:0;margin:0}#header-mobile .header-container .header-wrapper{padding:0 1rem;font-size:1.125rem;-webkit-transition:margin-top 0.3s ease 0s;-moz-transition:margin-top 0.3s ease 0s;-o-transition:margin-top 0.3s ease 0s;transition:margin-top 0.3s ease 0s}#header-mobile .header-container .header-wrapper .header-title{font-size:1.5rem;max-width:80%}#header-mobile .header-container .header-wrapper .menu-toggle{line-height:4rem;cursor:pointer;-webkit-transition:width 0.3s ease 0s;-moz-transition:width 0.3s ease 0s;-o-transition:width 0.3s ease 0s;transition:width 0.3s ease 0s}#header-mobile .header-container .header-wrapper .menu-toggle span{display:block;background:#161209;width:1.5rem;height:2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:all 0.3s ease-in-out;-moz-transition:all 0.3s ease-in-out;-o-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}.dark #header-mobile .header-container .header-wrapper .menu-toggle span{background:#a9a9b3}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(1){margin-bottom:.5rem}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(3){margin-top:.5rem}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(1){-webkit-transform:rotate(45deg) translate(0.4rem, 0.5rem);-moz-transform:rotate(45deg) translate(0.4rem, 0.5rem);-ms-transform:rotate(45deg) translate(0.4rem, 0.5rem);-o-transform:rotate(45deg) translate(0.4rem, 0.5rem);transform:rotate(45deg) translate(0.4rem, 0.5rem)}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(2){opacity:0}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(3){-webkit-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-moz-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-ms-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-o-transform:rotate(-45deg) translate(0.4rem, -0.5rem);transform:rotate(-45deg) translate(0.4rem, -0.5rem)}#header-mobile .header-container .menu{text-align:center;background:#f8f8f8;border-top:2px solid #cacaca;display:none;padding-top:.5rem;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}#header-mobile .header-container .menu .search-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:.5rem 1rem;line-height:2.5rem}#header-mobile .header-container .menu .search{flex-grow:10}#header-mobile .header-container .menu .search .algolia-autocomplete,#header-mobile .header-container .menu .search input{width:100%}#header-mobile .header-container .menu .search-cancel{display:none;margin-left:.75rem}#header-mobile .header-container .menu .menu-item{display:block;line-height:2.5rem}#header-mobile .header-container .menu.active{display:block}.dark #header-mobile .header-container .menu{background:#252627;border-top-color:#4a4b50}#header-mobile.open .header-wrapper{margin-top:-3.5rem}#header-mobile.open .menu{padding-top:0;border-top:none}#header-mobile.open .menu .menu-item{display:none}#header-mobile.open .menu .search-cancel{display:inline}.search-dropdown{position:fixed;z-index:200;top:3.5rem;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}.search-dropdown.desktop{right:1.5rem;width:30rem}.search-dropdown.mobile{right:0;width:100%}.search-dropdown .dropdown-menu{right:0 !important;background-color:#fff}.dark .search-dropdown .dropdown-menu{background-color:#292a2d}.search-dropdown .dropdown-menu .suggestions{overflow-y:auto;max-height:calc(100vh - 3.5rem)}.search-dropdown .dropdown-menu .suggestions .suggestion{padding:.75rem 1rem}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-title{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:bold;max-width:75%}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{font-size:.875rem;float:right;text-align:right;color:#a9a9b3}.dark .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{color:#5d5d5f}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{line-height:1.25rem;display:-moz-box;display:-webkit-box;display:box;-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{color:#5d5d5f}.search-dropdown .dropdown-menu .suggestions .suggestion em{font-style:normal;background-color:rgba(53,166,247,0.25)}.dark .search-dropdown .dropdown-menu .suggestions .suggestion em{background-color:rgba(50,112,194,0.4)}.search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#e8e8e8}.dark .search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#323843}.search-dropdown .dropdown-menu .suggestions .suggestion:hover{cursor:pointer}.search-dropdown .dropdown-menu .search-empty{padding:1rem;text-align:center}.search-dropdown .dropdown-menu .search-empty .search-query{font-weight:bold}.dark .search-dropdown .dropdown-menu .search-empty .search-query{color:#ddd}.search-dropdown .dropdown-menu .search-footer{padding:.5rem 1rem;float:right;font-size:.8rem;color:#a9a9b3}.search-dropdown .dropdown-menu .search-footer .dark{color:#5d5d5f}.search-dropdown .dropdown-menu .search-footer a{color:#2d96bd}.dark .search-dropdown .dropdown-menu .search-footer a{color:#55bde2}.search-dropdown .dropdown-menu .search-footer a:active,.search-dropdown .dropdown-menu .search-footer a:hover{color:#ef3982}.dark .search-dropdown .dropdown-menu .search-footer a:active,.dark .search-dropdown .dropdown-menu .search-footer a:hover{color:#bdebfc}.search-dropdown .dropdown-menu .search-footer a{font-size:1rem}footer{height:2rem;width:100%;text-align:center;line-height:1.5rem;padding-top:2rem}footer .copyright{font-size:.875rem}footer .copyright .copyright-line{width:100%}footer .copyright .copyright-line .icp-br{display:none}.blur footer{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.pagination{display:flex;flex-direction:row;justify-content:center;list-style:none;white-space:nowrap;width:100%;padding:1rem 0 0}.pagination a{font-size:.8rem;color:#bfbfbf;letter-spacing:.1rem;font-weight:700;padding:5px 5px;text-decoration:none;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s}.pagination li{padding-bottom:3px;margin:0 20px;box-sizing:border-box;position:relative;display:inline}.pagination li.disabled{display:none}.pagination li:hover a{color:#000}.dark .pagination li:hover a{color:#fff}.pagination li:before,.pagination li:after{position:absolute;content:"";width:0;height:3px;background:#000;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s;bottom:0px}.dark .pagination li:before,.dark .pagination li:after{background:#fff}.pagination li:before .active,.pagination li:after .active{width:100%}.pagination li:before{left:50%}.pagination li:after{right:50%}.pagination li:hover:before,.pagination li:hover:after{width:50%}.pagination li.active a{color:#000}.dark .pagination li.active a{color:#fff}.pagination li.active:before,.pagination li.active:after{width:60%}@media only screen and (max-width: 1440px){.page{max-width:56%}}@media only screen and (max-width: 1200px){.page{max-width:52%}}@media only screen and (max-width: 960px){#toc-auto{display:none}#toc-static{display:block}.page{max-width:80%}}@media only screen and (max-width: 680px){#header-desktop{display:none}#header-mobile{display:block}body.blur{overflow:hidden}.page{max-width:100%;padding-top:3.5rem}.page .categories-card .card-item{width:100%}.copyright .copyright-line .icp-splitter{display:none}.copyright .copyright-line .icp-br{display:block}}
+@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@800&display=swap");html{font-family:system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:400;font-display:swap;font-size:16px;line-height:1.5rem;width:100%}::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background-color:#87878d}::-webkit-scrollbar-thumb:hover{background-color:#a9a9b3}::selection{background-color:rgba(53,166,247,0.25)}.dark ::selection{background-color:rgba(50,112,194,0.4)}body{background-color:#fff;color:#161209;overflow-wrap:break-word;scrollbar-color:auto}body.dark{color:#a9a9b3;background-color:#292a2d}#mask{background-repeat:no-repeat;background-position:center;position:fixed;top:0;left:0;width:100%;height:100%;z-index:-1;background-color:rgba(0,0,0,0)}.blur #mask{z-index:100;background-color:rgba(0,0,0,0.25)}a{text-decoration:none}a{color:#161209}.dark a{color:#a9a9b3}a:active,a:hover{color:#2d96bd}.dark a:active,.dark a:hover{color:#fff}#fixed-buttons{display:none}.fixed-button{display:none;z-index:100;position:fixed;right:1.5rem;font-size:1rem;line-height:1.3rem;padding:.6rem .6rem;color:#a9a9b3;background:#f8f8f8;border:1px solid #b1b1b1;-webkit-border-radius:2rem;-moz-border-radius:2rem;border-radius:2rem}.blur .fixed-button{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.fixed-button:hover,.fixed-button:active{color:#161209;cursor:pointer}.fixed-button:active,.fixed-button:focus,.fixed-button:hover{outline:none}.dark .fixed-button{color:#5d5d5f;background:#252627;border-color:#313236}.dark .fixed-button:hover,.dark .fixed-button:active{color:#a9a9b3}#back-to-top{display:block;bottom:1.5rem}#view-comments{bottom:4.5rem}.wrapper{display:flex;flex-direction:column;min-height:97.5vh;width:100%}.wrapper main{flex:1 0 auto}.wrapper main .container{padding-left:1rem;padding-right:1rem}.page{position:relative;width:100%;max-width:60%;margin:0 auto;padding-top:3.5rem}.blur .page{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}#toc-auto{display:block;position:absolute;width:1000px;padding:0 .8rem;border-left:1px solid #cacaca;overflow-wrap:break-word;box-sizing:border-box;top:10rem;left:10000px}.blur #toc-auto{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.dark #toc-auto{border-left:1px solid #4a4b50}#toc-auto .toc-title{font-weight:400;margin:.8rem 0;text-transform:uppercase}#toc-auto .toc-content.always-active ul{display:block}#toc-auto .toc-content>nav>ul{margin:.625rem 0}#toc-auto .toc-content ul{text-indent:-0.85rem;padding-left:.625rem;list-style:none}#toc-auto .toc-content ul a::before{content:"|";font-weight:bolder;margin-right:.5rem;color:#2d96bd}.dark #toc-auto .toc-content ul a::before{color:#55bde2}#toc-auto .toc-content ul ul{padding-left:1.25rem;display:none}#toc-auto .toc-content ul .has-active>ul{display:block}#toc-auto .toc-content a.active{font-weight:bold;color:#2d96bd}.dark #toc-auto .toc-content a.active{color:#55bde2}#toc-auto .toc-content a.active::before{color:#ef3982}.dark #toc-auto .toc-content a.active::before{color:#bdebfc}#toc-static{display:none;margin:.8rem 0}#toc-static details summary{list-style:none;background:#ededed}.dark #toc-static details summary{background:#20252b}#toc-static details summary .toc-title{display:block;display:flex;justify-content:space-between;font-weight:bold;line-height:2em;padding:0 .625rem}#toc-static details summary .toc-title i.details{line-height:2em}#toc-static details summary .toc-title:hover{cursor:pointer}#toc-static details summary::-webkit-details-marker{display:none}#toc-static details[open] i.details{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}#toc-static .toc-content{background-color:#f5f5f5}#toc-static .toc-content>nav>ul{margin:0;padding:.4rem .8rem}#toc-static .toc-content ul{list-style:none}#toc-static .toc-content ul ul{padding-left:1.25rem}.dark #toc-static .toc-content{background-color:#272C34}.toc .toc-title{font-size:1.2rem}.toc .toc-content{font-size:1rem}.toc ruby{background:#f5f5f5}.toc ruby rt{color:#a9a9b3}.dark .toc ruby{background:#272C34}.dark .toc ruby rt{color:#5d5d5f}.single .single-title{margin:1rem 0 .5rem;font-size:1.6rem;line-height:140%}.single .single-subtitle{margin:.4rem 0;font-size:1.2rem;font-weight:normal;font-style:italic;line-height:100%}.single .post-meta{font-size:.875rem;color:#a9a9b3}.single .post-meta span{display:inline-block}.dark .single .post-meta{color:#5d5d5f}.single .post-meta a{color:#2d96bd}.dark .single .post-meta a{color:#a9a9b3}.single .post-meta a:active,.single .post-meta a:hover{color:#ef3982}.dark .single .post-meta a:active,.dark .single .post-meta a:hover{color:#fff}.single .post-meta .author{font-size:1.05rem}.single .featured-image{margin:.5rem 0}.single .featured-image img{display:block;width:100%;height:auto;margin:0 auto;overflow:hidden}.single .content>h2{font-size:1.5rem}.single .content>h2 code{font-size:1.25rem}.single .content>h3{font-size:1.375rem}.single .content>h3 code{font-size:1.125rem}.single .content>h4{font-size:1.25rem}.single .content>h4 code{font-size:1rem}.single .content>h5{font-size:1.125rem}.single .content>h6{font-size:1rem}.single .content h2,.single .content h3,.single .content h4,.single .content h5,.single .content h6{font-weight:bold;margin:1.2rem 0}.dark .single .content h2,.dark .single .content h3,.dark .single .content h4,.dark .single .content h5,.dark .single .content h6{font-weight:bolder}.single .content>h2>.header-mark::before,.single .content>h3>.header-mark::before,.single .content>h4>.header-mark::before,.single .content>h5>.header-mark::before,.single .content>h6>.header-mark::before{content:"|";margin-right:.3125rem;color:#2d96bd}.dark .single .content>h2>.header-mark::before,.dark .single .content>h3>.header-mark::before,.dark .single .content>h4>.header-mark::before,.dark .single .content>h5>.header-mark::before,.dark .single .content>h6>.header-mark::before{color:#55bde2}.single .content>h2>.header-mark::before{content:"#"}.single .content p{margin:.5rem 0}.single .content b,.single .content strong{font-weight:bold}.dark .single .content b,.dark .single .content strong{color:#ddd}.single .content a{color:#2d96bd}.dark .single .content a{color:#55bde2}.single .content a:active,.single .content a:hover{color:#ef3982}.dark .single .content a:active,.dark .single .content a:hover{color:#bdebfc}.single .content a{word-break:break-all;word-break:break-word}.dark .single .content a b,.dark .single .content a strong{color:#55bde2}.single .content .dark a:hover b,.single .content .dark a:hover strong{color:#bdebfc}.single .content ul{margin:.5rem 0;padding-left:2rem;list-style-type:disc}.single .content ruby{background:#f5f5f5}.single .content ruby rt{color:#a9a9b3}.dark .single .content ruby{background:#272C34}.dark .single .content ruby rt{color:#5d5d5f}.single .content .table-wrapper{overflow-x:auto}.single .content .table-wrapper::-webkit-scrollbar{background-color:#fff}.dark .single .content .table-wrapper::-webkit-scrollbar{background-color:#272c34}.single .content .table-wrapper>table{width:100%;max-width:100%;margin:.625rem 0;border-spacing:0;background:#fff;border-collapse:collapse}.dark .single .content .table-wrapper>table{background:#272c34}.single .content .table-wrapper>table thead{background:#ededed}.dark .single .content .table-wrapper>table thead{background-color:#20252b}.single .content .table-wrapper>table th,.single .content .table-wrapper>table td{padding:.3rem 1rem;border:1px double #cacaca}.dark .single .content .table-wrapper>table th,.dark .single .content .table-wrapper>table td{border:1px double #4a4b50}.single .content img{max-width:100%;min-height:1.2rem}.single .content figure{text-align:center}.single .content figure .image-caption:not(:empty){min-width:20%;max-width:80%;display:inline-block;padding:.5rem;margin:0 auto;font-size:.875rem;color:#969696}.single .content figure img{display:block;height:auto;margin:0 auto;overflow:hidden}.single .content .lazyloading{object-fit:none}.single .content blockquote{font-size:1rem;display:block;border-width:1px 0;border-style:solid;border-color:#cacaca;padding:1.5em 1.2em 0.5em 1.2em;margin:0 0 2em 0;position:relative}.single .content blockquote::before{content:'\201C';position:absolute;top:0em;left:50%;-webkit-transform:translate(-50%, -50%);-moz-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);-o-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:3rem;height:2rem;font:6em/1.08em 'PT Sans', sans-serif;color:#2d96bd;text-align:center}.dark .single .content blockquote::before{color:#55bde2}.single .content blockquote::after{content:"#blockquote" attr(cite);display:block;text-align:right;font-size:0.875em;color:#2d96bd}.dark .single .content blockquote::after{color:#55bde2}.dark .single .content blockquote{border-color:#4a4b50}.single .content .footnotes{color:#a9a9b3}.dark .single .content .footnotes{color:#5d5d5f}.single .content .footnotes p{margin:.25rem 0}.single .content code{font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;color:#E74C3C}.single .content code img,.single .content code .version img{min-height:1.05rem;height:1.05rem}.dark .single .content code{color:#E5BF78}.single .content code:not(.block){padding:.2rem .4rem}.single .content pre{position:relative;margin:0;padding:.25rem 0 .25rem .5rem;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.single .content pre .copy-button{font-size:.875rem;line-height:1.225rem;position:absolute;top:0;right:0;padding:.3rem .5rem;color:#b1b0b0;background:#ededed}.dark .single .content pre .copy-button{color:#b1b0b0;background:#20252b}.single .content pre .copy-button:hover,.single .content pre .copy-button:focus{cursor:pointer;color:#2d96bd}.dark .single .content pre .copy-button:hover,.dark .single .content pre .copy-button:focus{color:#fff}.single .content code,.single .content pre,.single .content .highlight table,.single .content .highlight tr,.single .content .highlight td{background:#f5f5f5}.dark .single .content code,.dark .single .content pre,.dark .single .content .highlight table,.dark .single .content .highlight tr,.dark .single .content .highlight td{background:#272C34}.single .content .highlight>.chroma table,.single .content .highlight>.chroma tr,.single .content .highlight>.chroma td,.single .content .gist table,.single .content .gist tr,.single .content .gist td{margin:0;padding:0;border:none !important;white-space:nowrap}.single .content .highlight>.chroma{position:relative;margin:.5rem 0}.single .content .highlight>.chroma pre{position:unset}.single .content .highlight>.chroma::before{display:block;padding:.3rem .4rem;font-family:system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;color:#b1b0b0;background:#ededed;content:'Code'}.dark .single .content .highlight>.chroma::before{color:#b1b0b0;background:#20252b}.single .content .highlight>.chroma.language-bash::before{content:"Bash"}.single .content .highlight>.chroma.language-c::before{content:"C"}.single .content .highlight>.chroma.language-cs::before{content:"C#"}.single .content .highlight>.chroma.language-cpp::before{content:"C++"}.single .content .highlight>.chroma.language-clojure::before{content:"Clojure"}.single .content .highlight>.chroma.language-coffeescript::before{content:"CoffeeScript"}.single .content .highlight>.chroma.language-css::before{content:"CSS"}.single .content .highlight>.chroma.language-dart::before{content:"Dart"}.single .content .highlight>.chroma.language-diff::before{content:"Diff"}.single .content .highlight>.chroma.language-erlang::before{content:"Erlang"}.single .content .highlight>.chroma.language-go::before{content:"Go"}.single .content .highlight>.chroma.language-go-html-template::before{content:"Go HTML Template"}.single .content .highlight>.chroma.language-groovy::before{content:"Groovy"}.single .content .highlight>.chroma.language-haskell::before{content:"Haskell"}.single .content .highlight>.chroma.language-html::before{content:"HTML"}.single .content .highlight>.chroma.language-http::before{content:"HTTP"}.single .content .highlight>.chroma.language-xml::before{content:"XML"}.single .content .highlight>.chroma.language-java::before{content:"Java"}.single .content .highlight>.chroma.language-js::before{content:"JavaScript"}.single .content .highlight>.chroma.language-javascript::before{content:"JavaScript"}.single .content .highlight>.chroma.language-json::before{content:"JSON"}.single .content .highlight>.chroma.language-kotlin::before{content:"Kotlin"}.single .content .highlight>.chroma.language-latex::before{content:"LaTeX"}.single .content .highlight>.chroma.language-less::before{content:"Less"}.single .content .highlight>.chroma.language-lisp::before{content:"Lisp"}.single .content .highlight>.chroma.language-lua::before{content:"Lua"}.single .content .highlight>.chroma.language-makefile::before{content:"Makefile"}.single .content .highlight>.chroma.language-markdown::before{content:"Markdown"}.single .content .highlight>.chroma.language-matlab::before{content:"Matlab"}.single .content .highlight>.chroma.language-objectivec::before{content:"Objective-C"}.single .content .highlight>.chroma.language-php::before{content:"PHP"}.single .content .highlight>.chroma.language-perl::before{content:"Perl"}.single .content .highlight>.chroma.language-python::before{content:"Python"}.single .content .highlight>.chroma.language-r::before{content:"R"}.single .content .highlight>.chroma.language-ruby::before{content:"Ruby"}.single .content .highlight>.chroma.language-rust::before{content:"Rust"}.single .content .highlight>.chroma.language-scala::before{content:"Scala"}.single .content .highlight>.chroma.language-scss::before{content:"Scss"}.single .content .highlight>.chroma.language-shell::before{content:"Shell"}.single .content .highlight>.chroma.language-sql::before{content:"SQL"}.single .content .highlight>.chroma.language-swift::before{content:"Swift"}.single .content .highlight>.chroma.language-tex::before{content:"TeX"}.single .content .highlight>.chroma.language-toml::before{content:"TOML"}.single .content .highlight>.chroma.language-ts::before{content:"TypeScript"}.single .content .highlight>.chroma.language-typescript::before{content:"TypeScript"}.single .content .highlight>.chroma.language-vue::before{content:"Vue"}.single .content .highlight>.chroma.language-yml::before{content:"YAML"}.single .content .highlight>.chroma.language-yaml::before{content:"YAML"}.single .content .highlight>.chroma .lntd:last-child{width:100%}.single .content .highlight>.chroma .lntd:last-child pre{padding-left:.75rem;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:intrinsic;min-width:max-content}.single .content .highlight>.chroma .ln{padding-right:.75rem}.single .content .highlight>.chroma .hl{display:block;background-color:#dcdcdc}.dark .single .content .highlight>.chroma .hl{background-color:#1c2025}.single .content .highlight>.chroma .ln,.single .content .highlight>.chroma .lnt{color:#a9a9b3}.dark .single .content .highlight>.chroma .ln,.dark .single .content .highlight>.chroma .lnt{color:#5d5d5f}.single .content .highlight{font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:.875rem;line-height:1.225rem}.single .content .highlight .c,.single .content .highlight .ch,.single .content .highlight .cm,.single .content .highlight .c1,.single .content .highlight .cs,.single .content .highlight .cp,.single .content .highlight .cpf{font-style:italic}.single .content .highlight .gl{text-decoration:underline}.single .content .highlight .p{color:#a9a9b3}.single .content .highlight .k{color:#b501a9}.single .content .highlight .kc{color:#b501a9}.single .content .highlight .kd{color:#b501a9}.single .content .highlight .kn{color:#b501a9}.single .content .highlight .kp{color:#b501a9}.single .content .highlight .kr{color:#b501a9}.single .content .highlight .kt{color:#b501a9}.single .content .highlight .n{color:#333}.single .content .highlight .na{color:#2b77fa}.single .content .highlight .nb{color:#f74840}.single .content .highlight .bp{color:#f74840}.single .content .highlight .nc{color:#cb8100}.single .content .highlight .no{color:#2b77fa}.single .content .highlight .nd{color:#0086c1}.single .content .highlight .ni{color:#2b77fa}.single .content .highlight .ne{color:#2b77fa}.single .content .highlight .nf{color:#2b77fa}.single .content .highlight .fm{color:#1ccad6}.single .content .highlight .nl{color:#2b77fa}.single .content .highlight .nn{color:#2b77fa}.single .content .highlight .nx{color:#333}.single .content .highlight .py{color:#2b77fa}.single .content .highlight .nt{color:#2b77fa}.single .content .highlight .nv{color:#2b77fa}.single .content .highlight .vc{color:#2b77fa}.single .content .highlight .vg{color:#2b77fa}.single .content .highlight .vi{color:#2b77fa}.single .content .highlight .vm{color:#2b77fa}.single .content .highlight .l{color:#2aa198}.single .content .highlight .ld{color:#2aa198}.single .content .highlight .s{color:#24a443}.single .content .highlight .sa{color:#24a443}.single .content .highlight .sb{color:#24a443}.single .content .highlight .sc{color:#24a443}.single .content .highlight .dl{color:#24a443}.single .content .highlight .sd{color:#24a443}.single .content .highlight .s2{color:#24a443}.single .content .highlight .se{color:#24a443}.single .content .highlight .sh{color:#24a443}.single .content .highlight .si{color:#24a443}.single .content .highlight .sx{color:#24a443}.single .content .highlight .sr{color:#24a443}.single .content .highlight .s1{color:#24a443}.single .content .highlight .ss{color:#24a443}.single .content .highlight .m{color:#e2893c}.single .content .highlight .mb{color:#e2893c}.single .content .highlight .mf{color:#e2893c}.single .content .highlight .mh{color:#e2893c}.single .content .highlight .mi{color:#e2893c}.single .content .highlight .il{color:#e2893c}.single .content .highlight .mo{color:#e2893c}.single .content .highlight .o{color:#f19b04}.single .content .highlight .ow{color:#b501a9}.single .content .highlight .c{color:#a0a1a8}.single .content .highlight .ch{color:#a0a1a8}.single .content .highlight .cm{color:#a0a1a8}.single .content .highlight .c1{color:#a0a1a8}.single .content .highlight .cs{color:#a0a1a8}.single .content .highlight .cp{color:#a0a1a8}.single .content .highlight .cpf{color:#a0a1a8}.single .content .highlight .g{color:#e72d40}.single .content .highlight .gd{color:#e72d40}.single .content .highlight .ge{color:#e72d40}.single .content .highlight .gr{color:#e72d40}.single .content .highlight .gh{color:#e72d40}.single .content .highlight .gi{color:#e72d40}.single .content .highlight .go{color:#e72d40}.single .content .highlight .gp{color:#e72d40}.single .content .highlight .gs{color:#e72d40}.single .content .highlight .gu{color:#e72d40}.single .content .highlight .gt{color:#e72d40}.single .content .highlight .w{color:#bbb}.dark .single .content .highlight .p{color:#a9a9b3}.dark .single .content .highlight .k{color:#d371e3}.dark .single .content .highlight .kc{color:#d371e3}.dark .single .content .highlight .kd{color:#d371e3}.dark .single .content .highlight .kn{color:#d371e3}.dark .single .content .highlight .kp{color:#d371e3}.dark .single .content .highlight .kr{color:#d371e3}.dark .single .content .highlight .kt{color:#d371e3}.dark .single .content .highlight .n{color:#a9b2c0}.dark .single .content .highlight .na{color:#41b0f5}.dark .single .content .highlight .nb{color:#19b9c4}.dark .single .content .highlight .bp{color:#ecbf6f}.dark .single .content .highlight .nc{color:#ecbf6f}.dark .single .content .highlight .no{color:#41b0f5}.dark .single .content .highlight .nd{color:#ecbf6f}.dark .single .content .highlight .ni{color:#41b0f5}.dark .single .content .highlight .ne{color:#41b0f5}.dark .single .content .highlight .nf{color:#41b0f5}.dark .single .content .highlight .fm{color:#19b9c4}.dark .single .content .highlight .nl{color:#41b0f5}.dark .single .content .highlight .nn{color:#41b0f5}.dark .single .content .highlight .nx{color:#a9a9b3}.dark .single .content .highlight .py{color:#41b0f5}.dark .single .content .highlight .nt{color:#41b0f5}.dark .single .content .highlight .nv{color:#41b0f5}.dark .single .content .highlight .vc{color:#41b0f5}.dark .single .content .highlight .vg{color:#41b0f5}.dark .single .content .highlight .vi{color:#41b0f5}.dark .single .content .highlight .vm{color:#41b0f5}.dark .single .content .highlight .l{color:#2aa198}.dark .single .content .highlight .ld{color:#2aa198}.dark .single .content .highlight .s{color:#8cc570}.dark .single .content .highlight .sa{color:#8cc570}.dark .single .content .highlight .sb{color:#8cc570}.dark .single .content .highlight .sc{color:#8cc570}.dark .single .content .highlight .dl{color:#8cc570}.dark .single .content .highlight .sd{color:#8cc570}.dark .single .content .highlight .s2{color:#8cc570}.dark .single .content .highlight .se{color:#8cc570}.dark .single .content .highlight .sh{color:#8cc570}.dark .single .content .highlight .si{color:#8cc570}.dark .single .content .highlight .sx{color:#8cc570}.dark .single .content .highlight .sr{color:#8cc570}.dark .single .content .highlight .s1{color:#8cc570}.dark .single .content .highlight .ss{color:#8cc570}.dark .single .content .highlight .m{color:#db985c}.dark .single .content .highlight .mb{color:#db985c}.dark .single .content .highlight .mf{color:#db985c}.dark .single .content .highlight .mh{color:#db985c}.dark .single .content .highlight .mi{color:#db985c}.dark .single .content .highlight .il{color:#db985c}.dark .single .content .highlight .mo{color:#db985c}.dark .single .content .highlight .o{color:#ecbf6f}.dark .single .content .highlight .ow{color:#d371e3}.dark .single .content .highlight .c{color:#7e848f}.dark .single .content .highlight .ch{color:#7e848f}.dark .single .content .highlight .cm{color:#7e848f}.dark .single .content .highlight .c1{color:#7e848f}.dark .single .content .highlight .cs{color:#7e848f}.dark .single .content .highlight .cp{color:#7e848f}.dark .single .content .highlight .cpf{color:#7e848f}.dark .single .content .highlight .g{color:#f16372}.dark .single .content .highlight .gd{color:#f16372}.dark .single .content .highlight .ge{color:#f16372}.dark .single .content .highlight .gr{color:#f16372}.dark .single .content .highlight .gh{color:#f16372}.dark .single .content .highlight .gi{color:#f16372}.dark .single .content .highlight .go{color:#f16372}.dark .single .content .highlight .gp{color:#f16372}.dark .single .content .highlight .gs{color:#f16372}.dark .single .content .highlight .gu{color:#f16372}.dark .single .content .highlight .gt{color:#f16372}.dark .single .content .highlight .w{color:#bbb}.single .content .gist .gist-file,.single .content .gist .gist-data,.single .content .gist .gist-meta{border:none}.single .content .gist .gist-meta{padding:.4rem .8rem;background-color:#e8e8e8}.single .content .gist .gist-meta a{color:#2d96bd}.dark .single .content .gist .gist-meta a{color:#55bde2}.single .content .gist .gist-meta a:active,.single .content .gist .gist-meta a:hover{color:#ef3982}.dark .single .content .gist .gist-meta a:active,.dark .single .content .gist .gist-meta a:hover{color:#bdebfc}.dark .single .content .gist .gist-meta{background-color:#1c2025}.dark .single .content .gist .highlight{background:#141414}.dark .single .content .gist .blob-num,.dark .single .content .gist .blob-code-inner,.dark .single .content .gist .highlight,.dark .single .content .gist .pl-enm,.dark .single .content .gist .pl-ko,.dark .single .content .gist .pl-mo,.dark .single .content .gist .pl-mp1 .pl-sf,.dark .single .content .gist .pl-ms,.dark .single .content .gist .pl-pdc1,.dark .single .content .gist .pl-scp,.dark .single .content .gist .pl-smc,.dark .single .content .gist .pl-som,.dark .single .content .gist .pl-va,.dark .single .content .gist .pl-vpf,.dark .single .content .gist .pl-vpu,.dark .single .content .gist .pl-mdr{color:#aab1bf}.dark .single .content .gist .pl-mb,.dark .single .content .gist .pl-pdb{font-weight:700}.dark .single .content .gist .pl-c,.dark .single .content .gist .pl-c span,.dark .single .content .gist .pl-pdc{color:#5b6270;font-style:italic}.dark .single .content .gist .pl-sr .pl-cce{color:#56b5c2;font-weight:400}.dark .single .content .gist .pl-ef,.dark .single .content .gist .pl-en,.dark .single .content .gist .pl-enf,.dark .single .content .gist .pl-eoai,.dark .single .content .gist .pl-kos,.dark .single .content .gist .pl-mh .pl-pdh,.dark .single .content .gist .pl-mr{color:#61afef}.dark .single .content .gist .pl-ens,.dark .single .content .gist .pl-vi{color:#be5046}.dark .single .content .gist .pl-enti,.dark .single .content .gist .pl-mai .pl-sf,.dark .single .content .gist .pl-ml,.dark .single .content .gist .pl-sf,.dark .single .content .gist .pl-sr,.dark .single .content .gist .pl-sr .pl-sra,.dark .single .content .gist .pl-src,.dark .single .content .gist .pl-st,.dark .single .content .gist .pl-vo{color:#56b5c2}.dark .single .content .gist .pl-eoi,.dark .single .content .gist .pl-mri,.dark .single .content .gist .pl-pds,.dark .single .content .gist .pl-pse .pl-s1,.dark .single .content .gist .pl-s,.dark .single .content .gist .pl-s1{color:#97c279}.dark .single .content .gist .pl-k,.dark .single .content .gist .pl-kolp,.dark .single .content .gist .pl-mc,.dark .single .content .gist .pl-pde{color:#c578dd}.dark .single .content .gist .pl-mi,.dark .single .content .gist .pl-pdi{color:#c578dd;font-style:italic}.dark .single .content .gist .pl-mp,.dark .single .content .gist .pl-stp{color:#818896}.dark .single .content .gist .pl-mdh,.dark .single .content .gist .pl-mdi,.dark .single .content .gist .pl-mdr{font-weight:400}.dark .single .content .gist .pl-mdht,.dark .single .content .gist .pl-mi1{color:#97c279;background:#020}.dark .single .content .gist .pl-md,.dark .single .content .gist .pl-mdhf{color:#df6b75;background:#200}.dark .single .content .gist .pl-corl{color:#df6b75;text-decoration:underline}.dark .single .content .gist .pl-ib{background:#df6b75}.dark .single .content .gist .pl-ii{background:#e0c184;color:#fff}.dark .single .content .gist .pl-iu{background:#e05151}.dark .single .content .gist .pl-ms1{color:#aab1bf;background:#373b41}.dark .single .content .gist .pl-c1,.dark .single .content .gist .pl-cn,.dark .single .content .gist .pl-e,.dark .single .content .gist .pl-eoa,.dark .single .content .gist .pl-eoac,.dark .single .content .gist .pl-eoac .pl-pde,.dark .single .content .gist .pl-kou,.dark .single .content .gist .pl-mm,.dark .single .content .gist .pl-mp .pl-s3,.dark .single .content .gist .pl-mq,.dark .single .content .gist .pl-s3,.dark .single .content .gist .pl-sok,.dark .single .content .gist .pl-sv,.dark .single .content .gist .pl-mb{color:#d19965}.dark .single .content .gist .pl-enc,.dark .single .content .gist .pl-entc,.dark .single .content .gist .pl-pse .pl-s2,.dark .single .content .gist .pl-s2,.dark .single .content .gist .pl-sc,.dark .single .content .gist .pl-smp,.dark .single .content .gist .pl-sr .pl-sre,.dark .single .content .gist .pl-stj,.dark .single .content .gist .pl-v,.dark .single .content .gist .pl-pdb{color:#e4bf7a}.dark .single .content .gist .pl-ent,.dark .single .content .gist .pl-entl,.dark .single .content .gist .pl-entm,.dark .single .content .gist .pl-mh,.dark .single .content .gist .pl-pdv,.dark .single .content .gist .pl-smi,.dark .single .content .gist .pl-sol,.dark .single .content .gist .pl-mdh,.dark .single .content .gist .pl-mdi{color:#df6b75}.dark .single .content iframe.instagram-media{border:none !important}.single .content .admonition{position:relative;margin:.9765em 0;padding:0 .75rem;background-color:rgba(68,138,255,0.1);border-left:0.25rem solid #448aff;overflow:auto}.single .content .admonition .admonition-title{margin:0 -0.75rem;padding:.2rem .75rem .2rem 1.8rem;border-bottom:0.05rem solid rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition .admonition-content{margin:.5rem 0}.single .content .admonition i.icon{font-size:0.85rem;color:#448aff;cursor:auto;position:absolute;left:.6rem;top:.6rem}.single .content .admonition.note{border-left-color:#448aff}.single .content .admonition.note i.icon{color:#448aff}.single .content .admonition.abstract{border-left-color:#00b0ff}.single .content .admonition.abstract i.icon{color:#00b0ff}.single .content .admonition.info{border-left-color:#00b8d4}.single .content .admonition.info i.icon{color:#00b8d4}.single .content .admonition.tip{border-left-color:#00bfa5}.single .content .admonition.tip i.icon{color:#00bfa5}.single .content .admonition.success{border-left-color:#00c853}.single .content .admonition.success i.icon{color:#00c853}.single .content .admonition.question{border-left-color:#64dd17}.single .content .admonition.question i.icon{color:#64dd17}.single .content .admonition.warning{border-left-color:#ff9100}.single .content .admonition.warning i.icon{color:#ff9100}.single .content .admonition.failure{border-left-color:#ff5252}.single .content .admonition.failure i.icon{color:#ff5252}.single .content .admonition.danger{border-left-color:#ff1744}.single .content .admonition.danger i.icon{color:#ff1744}.single .content .admonition.bug{border-left-color:#f50057}.single .content .admonition.bug i.icon{color:#f50057}.single .content .admonition.example{border-left-color:#651fff}.single .content .admonition.example i.icon{color:#651fff}.single .content .admonition.quote{border-left-color:#9e9e9e}.single .content .admonition.quote i.icon{color:#9e9e9e}.single .content .admonition.note{background-color:rgba(68,138,255,0.1)}.single .content .admonition.note .admonition-title{border-bottom-color:rgba(68,138,255,0.1);background-color:rgba(68,138,255,0.1)}.single .content .admonition.abstract{background-color:rgba(0,176,255,0.1)}.single .content .admonition.abstract .admonition-title{border-bottom-color:rgba(0,176,255,0.1);background-color:rgba(0,176,255,0.1)}.single .content .admonition.info{background-color:rgba(0,184,212,0.1)}.single .content .admonition.info .admonition-title{border-bottom-color:rgba(0,184,212,0.1);background-color:rgba(0,184,212,0.1)}.single .content .admonition.tip{background-color:rgba(0,191,165,0.1)}.single .content .admonition.tip .admonition-title{border-bottom-color:rgba(0,191,165,0.1);background-color:rgba(0,191,165,0.1)}.single .content .admonition.success{background-color:rgba(0,200,83,0.1)}.single .content .admonition.success .admonition-title{border-bottom-color:rgba(0,200,83,0.1);background-color:rgba(0,200,83,0.1)}.single .content .admonition.question{background-color:rgba(100,221,23,0.1)}.single .content .admonition.question .admonition-title{border-bottom-color:rgba(100,221,23,0.1);background-color:rgba(100,221,23,0.1)}.single .content .admonition.warning{background-color:rgba(255,145,0,0.1)}.single .content .admonition.warning .admonition-title{border-bottom-color:rgba(255,145,0,0.1);background-color:rgba(255,145,0,0.1)}.single .content .admonition.failure{background-color:rgba(255,82,82,0.1)}.single .content .admonition.failure .admonition-title{border-bottom-color:rgba(255,82,82,0.1);background-color:rgba(255,82,82,0.1)}.single .content .admonition.danger{background-color:rgba(255,23,68,0.1)}.single .content .admonition.danger .admonition-title{border-bottom-color:rgba(255,23,68,0.1);background-color:rgba(255,23,68,0.1)}.single .content .admonition.bug{background-color:rgba(245,0,87,0.1)}.single .content .admonition.bug .admonition-title{border-bottom-color:rgba(245,0,87,0.1);background-color:rgba(245,0,87,0.1)}.single .content .admonition.example{background-color:rgba(101,31,255,0.1)}.single .content .admonition.example .admonition-title{border-bottom-color:rgba(101,31,255,0.1);background-color:rgba(101,31,255,0.1)}.single .content .admonition.quote{background-color:rgba(158,158,158,0.1)}.single .content .admonition.quote .admonition-title{border-bottom-color:rgba(158,158,158,0.1);background-color:rgba(158,158,158,0.1)}.single .content .admonition:last-child{margin-bottom:.75rem}.single .content details.admonition summary{display:block;outline:none;cursor:pointer}.single .content details.admonition summary::-webkit-details-marker{display:none}.single .content details.admonition summary i.details{position:absolute;top:.5rem;right:.5rem;color:#161209}.dark .single .content details.admonition summary i.details{color:#a9a9b3}.single .content details.admonition[open] i.details{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.single .content .echarts{margin:.5rem 0;text-align:center}.single .content .mapbox{margin:.5rem 0;padding:.5rem 0}.single .content meting-js{margin:.5rem 0}.single .content .bilibili{position:relative;width:100%;height:0;padding-bottom:75%;margin:3% auto;text-align:center}.single .content .bilibili iframe{position:absolute;width:100%;height:100%;left:0;top:0}.single .content hr{margin:1rem 0;position:relative;border-top:1px dashed #cacaca;border-bottom:none}.dark .single .content hr{border-top:1px dashed #4a4b50}.single .content kbd{display:inline-block;padding:.25rem;background-color:#fff;border:1px solid #cacaca;border-bottom-color:#cacaca;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 #cacaca;box-shadow:inset 0 -1px 0 #cacaca;font-size:.8rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;color:#E74C3C}.dark .single .content kbd{background-color:#292a2d;border:1px solid #4a4b50;border-bottom-color:#4a4b50;-webkit-box-shadow:inset 0 -1px 0 #4a4b50;box-shadow:inset 0 -1px 0 #4a4b50;color:#E5BF78}.single .content .typeit .code{padding:.375rem;font-size:.875rem;font-family:Source Code Pro,Menlo,Consolas,Monaco,monospace,system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;word-break:break-all}.single .content .version img{min-height:1.2rem;height:1.2rem;vertical-align:text-bottom}.single .post-footer{margin-top:3rem}.single .post-footer .post-info{border-bottom:1px solid #cacaca;padding:1rem 0 0.3rem}.dark .single .post-footer .post-info{border-bottom:1px solid #4a4b50}.single .post-footer .post-info .post-info-line{display:flex;justify-content:space-between}.single .post-footer .post-info .post-info-line .post-info-mod{font-size:0.8em;color:#a9a9b3}.dark .single .post-footer .post-info .post-info-line .post-info-mod{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-mod a{color:#2d96bd}.dark .single .post-footer .post-info .post-info-line .post-info-mod a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-mod a:active,.single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#ef3982}.dark .single .post-footer .post-info .post-info-line .post-info-mod a:active,.dark .single .post-footer .post-info .post-info-line .post-info-mod a:hover{color:#bdebfc}.single .post-footer .post-info .post-info-line .post-info-license{font-size:0.8em;color:#a9a9b3}.dark .single .post-footer .post-info .post-info-line .post-info-license{color:#5d5d5f}.single .post-footer .post-info .post-info-line .post-info-md{font-size:0.8rem;width:8rem}.single .post-footer .post-info .post-info-line .post-info-md a{color:#2d96bd}.dark .single .post-footer .post-info .post-info-line .post-info-md a{color:#55bde2}.single .post-footer .post-info .post-info-line .post-info-md a:active,.single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#ef3982}.dark .single .post-footer .post-info .post-info-line .post-info-md a:active,.dark .single .post-footer .post-info .post-info-line .post-info-md a:hover{color:#bdebfc}.single .post-footer .post-info-more{padding:0.3rem 0 1rem;display:flex;justify-content:space-between;font-size:0.9rem}.single .post-footer .post-tags{max-width:65%}.single .post-footer .post-tags *{display:inline}.single .post-footer .post-nav::before,.single .post-footer .post-nav::after{content:' ';display:table}.single .post-footer .post-nav a.prev,.single .post-footer .post-nav a.next{font-size:1rem;font-weight:600;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;transition:all 0.3s ease-out}.single .post-footer .post-nav a.prev{float:left}.single .post-footer .post-nav a.prev:hover{-webkit-transform:translateX(-4px);-moz-transform:translateX(-4px);-ms-transform:translateX(-4px);-o-transform:translateX(-4px);transform:translateX(-4px)}.single .post-footer .post-nav a.next{float:right}.single .post-footer .post-nav a.next:hover{-webkit-transform:translateX(4px);-moz-transform:translateX(4px);-ms-transform:translateX(4px);-o-transform:translateX(4px);transform:translateX(4px)}.single .comment{padding:4rem 0}.special .single-title,.special .single-subtitle{text-align:right}.archive .single-title{text-align:right}.archive .archive-item{margin-left:2rem}.archive .categories-card{margin:0 auto;margin-top:3rem;display:flex;align-items:center;justify-content:space-between;flex-direction:row;flex-wrap:wrap;padding:0 2.5rem;line-height:1.6rem}.archive .categories-card .card-item{font-size:.875rem;text-align:left;width:45%;display:flex;align-items:flex-start;margin-top:2rem;min-height:10rem;padding:0 2%;position:relative}.archive .categories-card .card-item .card-item-wrapper{width:100%;overflow:hidden}.archive .categories-card .card-item .card-item-wrapper .card-item-title{font-size:1.2rem;font-weight:bold;display:inline-block}.archive .categories-card .card-item .card-item-wrapper span{float:right;padding-right:1rem}.archive .archive-item-link{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:95%}.archive .archive-item-link:hover{color:#2d96bd;background-color:transparent}.dark .archive .archive-item-link{color:#a9a9b3}.dark .archive .archive-item-link:hover{color:#fff}.archive .archive-item-date{float:right;text-align:right;color:#a9a9b3}.dark .archive .archive-item-date{color:#5d5d5f}.archive .more-post{text-align:right}.archive .tag-cloud-tags{margin:10px 0}.archive .tag-cloud-tags a{color:#161209}.dark .archive .tag-cloud-tags a{color:#a9a9b3}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:hover{color:#2d96bd}.dark .archive .tag-cloud-tags a:active,.dark .archive .tag-cloud-tags a:hover{color:#fff}.archive .tag-cloud-tags a{display:inline-block;position:relative;margin:5px 10px;overflow-wrap:break-word;-webkit-transition:all ease-out 0.3s;-moz-transition:all ease-out 0.3s;-o-transition:all ease-out 0.3s;transition:all ease-out 0.3s}.archive .tag-cloud-tags a:active,.archive .tag-cloud-tags a:focus,.archive .tag-cloud-tags a:hover{-webkit-transform:scale(1.2);-moz-transform:scale(1.2);-ms-transform:scale(1.2);-o-transform:scale(1.2);transform:scale(1.2)}.archive .tag-cloud-tags a sup{color:#a9a9b3}.dark .archive .tag-cloud-tags a sup{color:#5d5d5f}.home .home-profile{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0);padding:2rem 0 0.5rem;text-align:center}.home .home-profile .home-avatar{padding:0.6rem}.home .home-profile .home-avatar img{display:inline-block;width:6rem;height:auto;margin:0 auto;-webkit-border-radius:100%;-moz-border-radius:100%;border-radius:100%;-webkit-box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);box-shadow:0 0 0 0.3618em rgba(0,0,0,0.05);-webkit-transition:all 0.4s ease;-moz-transition:all 0.4s ease;-o-transition:all 0.4s ease;transition:all 0.4s ease;cursor:pointer}.home .home-profile .home-avatar img:hover{position:relative;-webkit-transform:translateY(-0.75rem);-moz-transform:translateY(-0.75rem);-ms-transform:translateY(-0.75rem);-o-transform:translateY(-0.75rem);transform:translateY(-0.75rem);cursor:pointer}.home .home-profile .home-subtitle{font-size:1rem;font-weight:normal;margin:0;padding:.4rem}.home .home-profile .social-links{padding:.4rem 0}.home .home-profile .social-links a,.home .home-profile .social-links i{font-size:1.6rem;line-height:2rem}.home .home-profile .social-links img{height:1.4rem;padding:0 .25rem}.home .home-profile .home-disclaimer{font-size:1rem;line-height:1.4rem;font-weight:normal;margin:0;padding:.4rem;color:#a9a9b3}.dark .home .home-profile .home-disclaimer{color:#5d5d5f}.home .summary{padding-top:1rem;padding-bottom:.8rem;color:#161209;border-bottom:1px dashed #cacaca}.dark .home .summary{color:#a9a9b3;border-bottom:1px dashed #4a4b50}.home .summary .featured-image-preview{width:100%;padding:30% 0 0;position:relative;margin:0.6rem auto}.home .summary .featured-image-preview img{position:absolute;width:100%;height:100%;left:0;top:0;object-fit:cover}.home .summary .single-title{font-size:1.4rem;line-height:140%;margin:0.4rem 0}.home .summary .content{display:-moz-box;display:-webkit-box;display:box;-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:3;margin-top:.3rem;width:100%;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark .home .summary .content{color:#5d5d5f}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6,.home .summary .content p{font-size:1rem;display:inline}.home .summary .content h2::after,.home .summary .content h3::after,.home .summary .content h4::after,.home .summary .content h5::after,.home .summary .content h6::after,.home .summary .content p::after{content:"\A";white-space:pre}.home .summary .content h2,.home .summary .content h3,.home .summary .content h4,.home .summary .content h5,.home .summary .content h6{line-height:2}.home .summary .content h2::before,.home .summary .content h3::before,.home .summary .content h4::before,.home .summary .content h5::before,.home .summary .content h6::before{content:"|";margin-right:.3125rem;color:#161209}.dark .home .summary .content h2::before,.dark .home .summary .content h3::before,.dark .home .summary .content h4::before,.dark .home .summary .content h5::before,.dark .home .summary .content h6::before{color:#a9a9b3}.home .summary .content h2{font-size:1.2rem}.home .summary .content h2::before{content:"#"}.home .summary .content a{color:#161209}.dark .home .summary .content a{color:#a9a9b3}.home .summary .content a:active,.home .summary .content a:hover{color:#2d96bd}.dark .home .summary .content a:active,.dark .home .summary .content a:hover{color:#fff}.dark .home .summary .content b,.dark .home .summary .content strong{color:#5d5d5f}.home .summary .post-footer{margin-top:.4rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem}.home .summary .post-footer a{color:#2d96bd}.dark .home .summary .post-footer a{color:#55bde2}.home .summary .post-footer a:active,.home .summary .post-footer a:hover{color:#ef3982}.dark .home .summary .post-footer a:active,.dark .home .summary .post-footer a:hover{color:#bdebfc}.home .summary .post-footer .post-tags{padding:0}.home .summary .post-footer .post-tags a{color:#161209}.dark .home .summary .post-footer .post-tags a{color:#a9a9b3}.home .summary .post-footer .post-tags a:active,.home .summary .post-footer .post-tags a:hover{color:#2d96bd}.dark .home .summary .post-footer .post-tags a:active,.dark .home .summary .post-footer .post-tags a:hover{color:#fff}#content-404{font-size:1.8rem;line-height:3rem;-webkit-transform:translateY(30vh);-moz-transform:translateY(30vh);-ms-transform:translateY(30vh);-o-transform:translateY(30vh);transform:translateY(30vh);text-align:center}header{width:100%;z-index:150;background-color:#f8f8f8}.dark header{background-color:#252627}.header-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;width:100%}.header-title{font-family:"Nunito",system,-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei UI,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:bold;margin-right:.5rem;min-width:10%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-flex:10;flex:10}.menu .menu-item{position:relative}.language-select{position:absolute;opacity:0;left:0;top:0;width:100%;height:100%}.language-select:hover{cursor:pointer}.search{position:relative}.search input{color:transparent;box-sizing:border-box;height:2.5rem;width:2.5rem;-webkit-border-radius:.5rem;-moz-border-radius:.5rem;border-radius:.5rem;border:none;outline:none;background-color:#f8f8f8;vertical-align:baseline !important;-webkit-transition:width 0.3s ease 0s;-moz-transition:width 0.3s ease 0s;-o-transition:width 0.3s ease 0s;transition:width 0.3s ease 0s}.dark .search input{background-color:#252627}.search input::-webkit-input-placeholder{color:rgba(0,0,0,0)}.search input:-moz-placeholder{color:rgba(0,0,0,0)}.search input::-moz-placeholder{color:rgba(0,0,0,0)}.search input:-ms-input-placeholder{color:rgba(0,0,0,0)}.search input::placeholder{color:rgba(0,0,0,0)}.search .search-button{margin:0;position:absolute;left:auto;right:1rem}.search .search-toggle{left:.5rem;right:auto}.search .search-loading{display:none}.search .search-clear{display:none}.open .search input,.search.mobile input{color:#161209;background-color:#e9e9e9;padding:0 2rem 0 2rem}.dark .open .search input,.dark .search.mobile input{color:#a9a9b3;background-color:#363636}.dark .open .search input::-webkit-input-placeholder,.dark .search.mobile input::-webkit-input-placeholder{color:#5d5d5f}.dark .open .search input:-moz-placeholder,.dark .search.mobile input:-moz-placeholder{color:#5d5d5f}.dark .open .search input::-moz-placeholder,.dark .search.mobile input::-moz-placeholder{color:#5d5d5f}.dark .open .search input:-ms-input-placeholder,.dark .search.mobile input:-ms-input-placeholder{color:#5d5d5f}.dark .open .search input::placeholder,.dark .search.mobile input::placeholder{color:#5d5d5f}.open .search input::-webkit-input-placeholder,.search.mobile input::-webkit-input-placeholder{color:#a9a9b3}.open .search input:-moz-placeholder,.search.mobile input:-moz-placeholder{color:#a9a9b3}.open .search input::-moz-placeholder,.search.mobile input::-moz-placeholder{color:#a9a9b3}.open .search input:-ms-input-placeholder,.search.mobile input:-ms-input-placeholder{color:#a9a9b3}.open .search input::placeholder,.search.mobile input::placeholder{color:#a9a9b3}.open .search .search-button,.search.mobile .search-button{color:#a9a9b3}.dark .open .search .search-button,.dark .search.mobile .search-button{color:#5d5d5f}.open .search .search-clear:hover,.search.mobile .search-clear:hover{color:#ff6b6b}.open .search .search-toggle:hover,.search.mobile .search-toggle:hover{cursor:default}.theme-switch i{-webkit-transform:rotate(225deg);-moz-transform:rotate(225deg);-ms-transform:rotate(225deg);-o-transform:rotate(225deg);transform:rotate(225deg)}#header-desktop{display:block;position:fixed;height:3.5rem;line-height:3.5rem}#header-desktop .header-wrapper{padding:0 1.5rem}#header-desktop .header-wrapper .header-title{font-size:1.5rem}#header-desktop .header-wrapper .menu{overflow:hidden;white-space:nowrap}#header-desktop .header-wrapper .menu .menu-inner{float:right}#header-desktop .header-wrapper .menu .menu-item{margin:0 .5rem}#header-desktop .header-wrapper .menu .menu-item.delimiter{border-left:1.5px solid #161209}.dark #header-desktop .header-wrapper .menu .menu-item.delimiter{border-left-color:#4a4b50}#header-desktop .header-wrapper .menu .menu-item.language{margin-right:0}#header-desktop .header-wrapper .menu .menu-item.search{margin:0 -.5rem 0 0}#header-desktop .header-wrapper .menu a.active{font-weight:900;color:#161209}.dark #header-desktop .header-wrapper .menu a.active{color:#fff}#header-desktop.open .header-wrapper .menu .menu-item.search{margin:0 .25rem 0 .5rem}#header-desktop.open .header-wrapper .menu .menu-item.search input{width:24rem}#header-mobile{display:none;position:fixed;height:3.5rem;line-height:3.5rem}#header-mobile .header-container{padding:0;margin:0}#header-mobile .header-container .header-wrapper{padding:0 1rem;font-size:1.125rem;-webkit-transition:margin-top 0.3s ease 0s;-moz-transition:margin-top 0.3s ease 0s;-o-transition:margin-top 0.3s ease 0s;transition:margin-top 0.3s ease 0s}#header-mobile .header-container .header-wrapper .header-title{font-size:1.5rem;max-width:80%}#header-mobile .header-container .header-wrapper .menu-toggle{line-height:4rem;cursor:pointer;-webkit-transition:width 0.3s ease 0s;-moz-transition:width 0.3s ease 0s;-o-transition:width 0.3s ease 0s;transition:width 0.3s ease 0s}#header-mobile .header-container .header-wrapper .menu-toggle span{display:block;background:#161209;width:1.5rem;height:2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-transition:all 0.3s ease-in-out;-moz-transition:all 0.3s ease-in-out;-o-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}.dark #header-mobile .header-container .header-wrapper .menu-toggle span{background:#a9a9b3}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(1){margin-bottom:.5rem}#header-mobile .header-container .header-wrapper .menu-toggle span:nth-child(3){margin-top:.5rem}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(1){-webkit-transform:rotate(45deg) translate(0.4rem, 0.5rem);-moz-transform:rotate(45deg) translate(0.4rem, 0.5rem);-ms-transform:rotate(45deg) translate(0.4rem, 0.5rem);-o-transform:rotate(45deg) translate(0.4rem, 0.5rem);transform:rotate(45deg) translate(0.4rem, 0.5rem)}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(2){opacity:0}#header-mobile .header-container .header-wrapper .menu-toggle.active span:nth-child(3){-webkit-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-moz-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-ms-transform:rotate(-45deg) translate(0.4rem, -0.5rem);-o-transform:rotate(-45deg) translate(0.4rem, -0.5rem);transform:rotate(-45deg) translate(0.4rem, -0.5rem)}#header-mobile .header-container .menu{text-align:center;background:#f8f8f8;border-top:2px solid #cacaca;display:none;padding-top:.5rem;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}#header-mobile .header-container .menu .search-wrapper{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:.5rem 1rem;line-height:2.5rem}#header-mobile .header-container .menu .search{flex-grow:10}#header-mobile .header-container .menu .search .algolia-autocomplete,#header-mobile .header-container .menu .search input{width:100%}#header-mobile .header-container .menu .search-cancel{display:none;margin-left:.75rem}#header-mobile .header-container .menu .menu-item{display:block;line-height:2.5rem}#header-mobile .header-container .menu.active{display:block}.dark #header-mobile .header-container .menu{background:#252627;border-top-color:#4a4b50}#header-mobile.open .header-wrapper{margin-top:-3.5rem}#header-mobile.open .menu{padding-top:0;border-top:none}#header-mobile.open .menu .menu-item{display:none}#header-mobile.open .menu .search-cancel{display:inline}.search-dropdown{position:fixed;z-index:200;top:3.5rem;-webkit-box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1);box-shadow:0 0.125rem 0.25rem rgba(0,0,0,0.1)}.search-dropdown.desktop{right:1.5rem;width:30rem}.search-dropdown.mobile{right:0;width:100%}.search-dropdown .dropdown-menu{right:0 !important;background-color:#fff}.dark .search-dropdown .dropdown-menu{background-color:#292a2d}.search-dropdown .dropdown-menu .suggestions{overflow-y:auto;max-height:calc(100vh - 3.5rem)}.search-dropdown .dropdown-menu .suggestions .suggestion{padding:.75rem 1rem}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-title{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;font-weight:bold;max-width:75%}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{font-size:.875rem;float:right;text-align:right;color:#a9a9b3}.dark .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-date{color:#5d5d5f}.search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{line-height:1.25rem;display:-moz-box;display:-webkit-box;display:box;-webkit-box-orient:vertical;-moz-box-orient:vertical;box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;color:#a9a9b3}.dark .search-dropdown .dropdown-menu .suggestions .suggestion .suggestion-context{color:#5d5d5f}.search-dropdown .dropdown-menu .suggestions .suggestion em{font-style:normal;background-color:rgba(53,166,247,0.25)}.dark .search-dropdown .dropdown-menu .suggestions .suggestion em{background-color:rgba(50,112,194,0.4)}.search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#e8e8e8}.dark .search-dropdown .dropdown-menu .suggestions .suggestion.cursor{background:#323843}.search-dropdown .dropdown-menu .suggestions .suggestion:hover{cursor:pointer}.search-dropdown .dropdown-menu .search-empty{padding:1rem;text-align:center}.search-dropdown .dropdown-menu .search-empty .search-query{font-weight:bold}.dark .search-dropdown .dropdown-menu .search-empty .search-query{color:#ddd}.search-dropdown .dropdown-menu .search-footer{padding:.5rem 1rem;float:right;font-size:.8rem;color:#a9a9b3}.search-dropdown .dropdown-menu .search-footer .dark{color:#5d5d5f}.search-dropdown .dropdown-menu .search-footer a{color:#2d96bd}.dark .search-dropdown .dropdown-menu .search-footer a{color:#55bde2}.search-dropdown .dropdown-menu .search-footer a:active,.search-dropdown .dropdown-menu .search-footer a:hover{color:#ef3982}.dark .search-dropdown .dropdown-menu .search-footer a:active,.dark .search-dropdown .dropdown-menu .search-footer a:hover{color:#bdebfc}.search-dropdown .dropdown-menu .search-footer a{font-size:1rem}footer{height:2rem;width:100%;text-align:center;line-height:1.5rem;padding-top:2rem}footer .footer-container{font-size:.875rem}footer .footer-container .footer-line{width:100%}footer .footer-container .footer-line .icp-br{display:none}.blur footer{-webkit-filter:blur(1.5px);-moz-filter:blur(1.5px);-ms-filter:blur(1.5px);filter:blur(1.5px)}.pagination{display:flex;flex-direction:row;justify-content:center;list-style:none;white-space:nowrap;width:100%;padding:1rem 0 0}.pagination a{font-size:.8rem;color:#bfbfbf;letter-spacing:.1rem;font-weight:700;padding:5px 5px;text-decoration:none;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s}.pagination li{padding-bottom:3px;margin:0 20px;box-sizing:border-box;position:relative;display:inline}.pagination li.disabled{display:none}.pagination li:hover a{color:#000}.dark .pagination li:hover a{color:#fff}.pagination li:before,.pagination li:after{position:absolute;content:"";width:0;height:3px;background:#000;-webkit-transition:0.3s;-moz-transition:0.3s;-o-transition:0.3s;transition:0.3s;bottom:0px}.dark .pagination li:before,.dark .pagination li:after{background:#fff}.pagination li:before .active,.pagination li:after .active{width:100%}.pagination li:before{left:50%}.pagination li:after{right:50%}.pagination li:hover:before,.pagination li:hover:after{width:50%}.pagination li.active a{color:#000}.dark .pagination li.active a{color:#fff}.pagination li.active:before,.pagination li.active:after{width:60%}@media only screen and (max-width: 1440px){.page{max-width:56%}}@media only screen and (max-width: 1200px){.page{max-width:52%}}@media only screen and (max-width: 960px){#toc-auto{display:none}#toc-static{display:block}.page{max-width:80%}}@media only screen and (max-width: 680px){#header-desktop{display:none}#header-mobile{display:block}body.blur{overflow:hidden}.page{max-width:100%;padding-top:3.5rem}.page .categories-card .card-item{width:100%}.copyright .copyright-line .icp-splitter{display:none}.copyright .copyright-line .icp-br{display:block}}
/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file
diff --git a/src/js/theme.js b/src/js/theme.js
index 781fb45..df7f83c 100644
--- a/src/js/theme.js
+++ b/src/js/theme.js
@@ -31,7 +31,7 @@ class Util {
class Theme {
constructor() {
this.config = window.config;
- this.contentData = this.config.content;
+ this.data = this.config.data;
this.isDark = document.body.classList.contains('dark');
this.util = new Util();
this.newScrollTop = this.util.getScrollTop();
@@ -356,7 +356,7 @@ class Theme {
const $tocLinkElements = $tocCore.getElementsByTagName('a');
const $tocLiElements = $tocCore.getElementsByTagName('li');
const $headerLinkElements = document.getElementsByClassName('headerLink');
- const headerIsFixed = this.config.desktopHeaderMode !== 'normal';
+ const headerIsFixed = this.config.headerMode.desktop !== 'normal';
const headerHeight = document.getElementById('header-desktop').offsetHeight;
const TOP_SPACING = 20 + (headerIsFixed ? headerHeight : 0);
const minTocTop = $toc.offsetTop;
@@ -412,7 +412,7 @@ class Theme {
if ($mermaidElements.length) {
mermaid.initialize({startOnLoad: false, theme: 'null'});
this.util.forEach($mermaidElements, $mermaid => {
- mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.contentData[$mermaid.id], svgCode => {
+ mermaid.mermaidAPI.render('svg-' + $mermaid.id, this.data[$mermaid.id], svgCode => {
$mermaid.innerHTML = svgCode;
}, $mermaid);
});
@@ -428,7 +428,7 @@ class Theme {
this._echartsArr = [];
this.util.forEach(document.getElementsByClassName('echarts'), $echarts => {
const chart = echarts.init($echarts, this.isDark ? 'dark' : 'macarons', {renderer: 'svg'});
- chart.setOption(JSON.parse(this.contentData[$echarts.id]));
+ chart.setOption(JSON.parse(this.data[$echarts.id]));
this._echartsArr.push(chart);
});
});
@@ -448,7 +448,7 @@ class Theme {
mapboxgl.setRTLTextPlugin(this.config.mapbox.RTLTextPlugin);
this._mapboxArr = this._mapboxArr || [];
this.util.forEach(document.getElementsByClassName('mapbox'), $mapbox => {
- const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.contentData[$mapbox.id];
+ const { lng, lat, zoom, lightStyle, darkStyle, marked, navigation, geolocate, scale, fullscreen } = this.data[$mapbox.id];
const mapbox = new mapboxgl.Map({
container: $mapbox,
center: [lng, lat],
@@ -484,7 +484,7 @@ class Theme {
this._mapboxOnSwitchTheme = this._mapboxOnSwitchTheme || (() => {
this.util.forEach(this._mapboxArr, mapbox => {
const $mapbox = mapbox.getContainer();
- const { lightStyle, darkStyle } = this.contentData[$mapbox.id];
+ const { lightStyle, darkStyle } = this.data[$mapbox.id];
mapbox.setStyle(this.isDark ? darkStyle : lightStyle);
mapbox.addControl(new MapboxLanguage());
});
@@ -495,26 +495,25 @@ class Theme {
initTypeit() {
if (this.config.typeit) {
- const typeitData = this.config.typeit;
- for (let i = 0; i < typeitData.length; i++) {
- const group = typeitData[i];
- ((i) => {
+ this.config.typeit.forEach(group => {
+ const typeone = (i) => {
const id = group[i];
if (i === group.length - 1) {
new TypeIt(`#${id}`, {
- strings: this.contentData[id],
+ strings: this.data[id],
}).go();
return;
}
let instance = new TypeIt(`#${id}`, {
- strings: this.contentData[id],
+ strings: this.data[id],
afterComplete: () => {
instance.destroy();
typeone(i + 1);
},
}).go();
- })(0);
- }
+ };
+ typeone(0);
+ });
}
}
@@ -528,8 +527,8 @@ class Theme {
}
initSmoothScroll() {
- if ((!this.util.isMobile() && this.config.desktopHeaderMode === 'normal')
- || (this.util.isMobile() && this.config.mobileHeaderMode === 'normal')) {
+ if ((!this.util.isMobile() && this.config.headerMode.desktop === 'normal')
+ || (this.util.isMobile() && this.config.headerMode.mobile === 'normal')) {
new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true});
} else {
new SmoothScroll('[href^="#"]', {speed: 300, speedAsDuration: true, header: '#header-desktop'});
@@ -538,8 +537,8 @@ class Theme {
onScroll() {
const $headers = [];
- if (this.config.desktopHeaderMode === 'auto') $headers.push(document.getElementById('header-desktop'));
- if (this.config.mobileHeaderMode === 'auto') $headers.push(document.getElementById('header-mobile'));
+ if (this.config.headerMode.desktop === 'auto') $headers.push(document.getElementById('header-desktop'));
+ if (this.config.headerMode.mobile === 'auto') $headers.push(document.getElementById('header-mobile'));
if (document.getElementById('comments')) {
const $viewComments = document.getElementById('view-comments');
$viewComments.href = `#comments`;
@@ -606,14 +605,14 @@ class Theme {
this.initHighlight();
this.initTable();
this.initHeaderLink();
+ this.initToc();
+ this.initComment();
+ this.initSmoothScroll();
this.initMath();
this.initMermaid();
this.initEcharts();
- this.initMapbox();
this.initTypeit();
- this.initToc();
- this.initComment();
- this.initSmoothScroll();
+ this.initMapbox();
this.onScroll();
this.onResize();