mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-04-27 06:06:20 +02:00
Merge pull request #295 from dillonzq/develop
This commit is contained in:
commit
63d04c7e3c
40 changed files with 253 additions and 191 deletions
README.mdREADME.zh-cn.md
assets
css
js
lib
svg
exampleSite
config.toml
content
about.en.mdabout.fr.mdabout.zh-cn.md
posts
theme-documentation-basics.en.mdtheme-documentation-basics.fr.mdtheme-documentation-basics.zh-cn.mdtheme-documentation-built-in-shortcodes.en.mdtheme-documentation-built-in-shortcodes.fr.mdtheme-documentation-built-in-shortcodes.zh-cn.mdtheme-documentation-extended-shortcodes.en.mdtheme-documentation-extended-shortcodes.fr.mdtheme-documentation-extended-shortcodes.zh-cn.md
static
images
music
images
layouts
package.jsonresources/_gen/assets/scss/css
style.template.scss_788c4a23da05f3aa3e03b28055a2e5f9.contentstyle.template.scss_84a735b886b24531b6e80c5fb2060510.contentstyle.template.scss_d40178ffcb058d725849178b0a7a43cc.content
src/js
|
@ -156,6 +156,7 @@ Thanks to the authors of following resources included in the theme:
|
|||
* [Lunr.js](https://lunrjs.com/)
|
||||
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
|
||||
* [lazysizes](https://github.com/aFarkas/lazysizes)
|
||||
* [object-fit-images](https://github.com/fregante/object-fit-images)
|
||||
* [Twemoji](https://github.com/twitter/twemoji)
|
||||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
|
||||
|
|
|
@ -151,6 +151,7 @@ LoveIt 主题中用到了以下项目,感谢它们的作者:
|
|||
* [Lunr.js](https://lunrjs.com/)
|
||||
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
|
||||
* [lazysizes](https://github.com/aFarkas/lazysizes)
|
||||
* [object-fit-images](https://github.com/fregante/object-fit-images)
|
||||
* [Twemoji](https://github.com/twitter/twemoji)
|
||||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
|
||||
|
|
|
@ -41,13 +41,14 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
@import "../_partial/mask";
|
||||
@include ms;
|
||||
@include link(true, true);
|
||||
|
||||
@import "../_partial/mask";
|
||||
@import "../_partial/icon";
|
||||
@import "../_partial/details";
|
||||
@import "../_partial/fixed-button";
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
img {
|
||||
@include object-fit(contain);
|
||||
}
|
||||
|
|
|
@ -96,3 +96,15 @@
|
|||
-ms-line-break: $value;
|
||||
line-break: $value;
|
||||
}
|
||||
|
||||
@mixin ms {
|
||||
input::-ms-clear {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin object-fit($value) {
|
||||
-o-object-fit: $value;
|
||||
object-fit: $value;
|
||||
font-family: 'object-fit: #{$value};';
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
@mixin link($light, $dark) {
|
||||
a, a::before, a::after {
|
||||
text-decoration: none;
|
||||
|
||||
color: if($light, $global-link-color, $single-link-color);
|
||||
|
||||
[theme=dark] & {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
object-fit: cover;
|
||||
@include object-fit(cover);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
|
|
|
@ -234,7 +234,7 @@
|
|||
}
|
||||
|
||||
.lazyloading {
|
||||
object-fit: none;
|
||||
@include object-fit(none);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
|
|
2
assets/js/theme.min.js
vendored
2
assets/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -7,18 +7,19 @@ autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js
|
|||
lunr.js@2.3.8 https://lunrjs.com/
|
||||
algoliasearch@4.2.0 https://github.com/algolia/algoliasearch-client-javascript
|
||||
lazysizes@5.2.0 https://github.com/aFarkas/lazysizes
|
||||
object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
|
||||
twemoji@12.1.5 https://github.com/twitter/twemoji
|
||||
lightgallery.js@1.1.3 https://github.com/sachinchoolur/lightgallery.js
|
||||
lg-thumbnail.js@1.1.0 https://github.com/sachinchoolur/lg-thumbnail.js
|
||||
lg-zoom.js@1.0.1 https://github.com/sachinchoolur/lg-zoom.js
|
||||
clipboard.js@2.0.6 https://github.com/zenorocha/clipboard.js
|
||||
sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js
|
||||
typeit@7.0.3 https://github.com/alexmacarthur/typeit
|
||||
typeit@6.5.1 https://github.com/alexmacarthur/typeit
|
||||
katex@0.11.1 https://katex.org/
|
||||
mermaid@8.5.0 https://github.com/knsv/mermaid
|
||||
echarts@4.7.0 https://echarts.apache.org/
|
||||
mapbox-gl@1.9.1 https://github.com/mapbox/mapbox-gl-js
|
||||
mapbox-gl@1.10.0 https://github.com/mapbox/mapbox-gl-js
|
||||
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||
meting@2.0.1 https://github.com/metowolf/MetingJS
|
||||
gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
valine@1.4.9 https://valine.js.org/
|
||||
valine@1.4.14 https://valine.js.org/
|
||||
|
|
6
assets/lib/mapbox-gl/mapbox-gl.min.js
vendored
6
assets/lib/mapbox-gl/mapbox-gl.min.js
vendored
File diff suppressed because one or more lines are too long
2
assets/lib/object-fit-images/ofi.min.js
vendored
Normal file
2
assets/lib/object-fit-images/ofi.min.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/*! npm.im/object-fit-images 3.2.4 */
|
||||
var objectFitImages=function(){"use strict";function t(t,e){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='"+t+"' height='"+e+"'%3E%3C/svg%3E"}function e(t){if(t.srcset&&!p&&window.picturefill){var e=window.picturefill._;t[e.ns]&&t[e.ns].evaled||e.fillImg(t,{reselect:!0}),t[e.ns].curSrc||(t[e.ns].supported=!1,e.fillImg(t,{reselect:!0})),t.currentSrc=t[e.ns].curSrc||t.src}}function i(t){for(var e,i=getComputedStyle(t).fontFamily,r={};null!==(e=u.exec(i));)r[e[1]]=e[2];return r}function r(e,i,r){var n=t(i||1,r||0);b.call(e,"src")!==n&&h.call(e,"src",n)}function n(t,e){t.naturalWidth?e(t):setTimeout(n,100,t,e)}function c(t){var c=i(t),o=t[l];if(c["object-fit"]=c["object-fit"]||"fill",!o.img){if("fill"===c["object-fit"])return;if(!o.skipTest&&f&&!c["object-position"])return}if(!o.img){o.img=new Image(t.width,t.height),o.img.srcset=b.call(t,"data-ofi-srcset")||t.srcset,o.img.src=b.call(t,"data-ofi-src")||t.src,h.call(t,"data-ofi-src",t.src),t.srcset&&h.call(t,"data-ofi-srcset",t.srcset),r(t,t.naturalWidth||t.width,t.naturalHeight||t.height),t.srcset&&(t.srcset="");try{s(t)}catch(t){window.console&&console.warn("https://bit.ly/ofi-old-browser")}}e(o.img),t.style.backgroundImage='url("'+(o.img.currentSrc||o.img.src).replace(/"/g,'\\"')+'")',t.style.backgroundPosition=c["object-position"]||"center",t.style.backgroundRepeat="no-repeat",t.style.backgroundOrigin="content-box",/scale-down/.test(c["object-fit"])?n(o.img,function(){o.img.naturalWidth>t.width||o.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"}):t.style.backgroundSize=c["object-fit"].replace("none","auto").replace("fill","100% 100%"),n(o.img,function(e){r(t,e.naturalWidth,e.naturalHeight)})}function s(t){var e={get:function(e){return t[l].img[e?e:"src"]},set:function(e,i){return t[l].img[i?i:"src"]=e,h.call(t,"data-ofi-"+i,e),c(t),e}};Object.defineProperty(t,"src",e),Object.defineProperty(t,"currentSrc",{get:function(){return e.get("currentSrc")}}),Object.defineProperty(t,"srcset",{get:function(){return e.get("srcset")},set:function(t){return e.set(t,"srcset")}})}function o(){function t(t,e){return t[l]&&t[l].img&&("src"===e||"srcset"===e)?t[l].img:t}d||(HTMLImageElement.prototype.getAttribute=function(e){return b.call(t(this,e),e)},HTMLImageElement.prototype.setAttribute=function(e,i){return h.call(t(this,e),e,String(i))})}function a(t,e){var i=!y&&!t;if(e=e||{},t=t||"img",d&&!e.skipTest||!m)return!1;"img"===t?t=document.getElementsByTagName("img"):"string"==typeof t?t=document.querySelectorAll(t):"length"in t||(t=[t]);for(var r=0;r<t.length;r++)t[r][l]=t[r][l]||{skipTest:e.skipTest},c(t[r]);i&&(document.body.addEventListener("load",function(t){"IMG"===t.target.tagName&&a(t.target,{skipTest:e.skipTest})},!0),y=!0,t="img"),e.watchMQ&&window.addEventListener("resize",a.bind(null,t,{skipTest:e.skipTest}))}var l="bfred-it:object-fit-images",u=/(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g,g="undefined"==typeof Image?{style:{"object-position":1}}:new Image,f="object-fit"in g.style,d="object-position"in g.style,m="background-size"in g.style,p="string"==typeof g.currentSrc,b=g.getAttribute,h=g.setAttribute,y=!1;return a.supportsObjectFit=f,a.supportsObjectPosition=d,o(),a}();
|
6
assets/lib/typeit/typeit.min.js
vendored
6
assets/lib/typeit/typeit.min.js
vendored
File diff suppressed because one or more lines are too long
12
assets/lib/valine/Valine.min.js
vendored
12
assets/lib/valine/Valine.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,18 +1,19 @@
|
|||
{{- /* https://img.shields.io/badge/$label-$version-$color?style=flat-square&labelColor=403c3d */ -}}
|
||||
{{- $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">
|
||||
{{- $width := add $labelLength $versionLength | add 200 -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {{ $width }} 200">
|
||||
<g shape-rendering="crispEdges">
|
||||
{{- $x1 := add $labelLength 100 | mul 0.1 -}}
|
||||
{{- $x2 := add $versionLength 100 | mul 0.1 -}}
|
||||
<path fill="#403c3d" d="M0 0h{{ $x1 }}v20H0z"/>
|
||||
<path fill="#{{ .color }}" d="M{{ $x1 }} 0h{{ $x2 }}v20H{{ $x1 }}z"/>
|
||||
{{- $x1 := add $labelLength 100 -}}
|
||||
{{- $x2 := add $versionLength 100 -}}
|
||||
<path fill="#403c3d" d="M0 0h{{ $x1 }}v200H0z"/>
|
||||
<path fill="#{{ .color }}" d="M{{ $x1 }} 0h{{ $x2 }}v200H{{ $x1 }}z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="{{ div $labelLength 2 | add 60 }}" y="140" textLength="{{ $labelLength }}" transform="scale(.1)">
|
||||
<text x="{{ div $labelLength 2 | add 60 }}" y="140" textLength="{{ $labelLength }}">
|
||||
{{- .label -}}
|
||||
</text>
|
||||
<text x="{{ div $versionLength 2 | add $labelLength | add 140 }}" y="140" textLength="{{ $versionLength }}" transform="scale(.1)">
|
||||
<text x="{{ div $versionLength 2 | add $labelLength | add 140 }}" y="140" textLength="{{ $versionLength }}">
|
||||
{{- .version -}}
|
||||
</text>
|
||||
</g>
|
||||
|
|
|
@ -116,7 +116,7 @@ enableEmoji = true
|
|||
# type of search engine ("lunr", "algolia")
|
||||
type = "algolia"
|
||||
# max index length of the chunked content
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# placeholder of the search bar
|
||||
placeholder = ""
|
||||
# max number of results length
|
||||
|
@ -310,7 +310,7 @@ enableEmoji = true
|
|||
# 搜索引擎的类型 ("lunr", "algolia")
|
||||
type = "algolia"
|
||||
# 文章内容最长索引长度
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# 搜索框的占位提示语
|
||||
placeholder = ""
|
||||
# 最大结果数目
|
||||
|
@ -500,7 +500,7 @@ enableEmoji = true
|
|||
# type of search engine ("lunr", "algolia")
|
||||
type = "algolia"
|
||||
# max index length of the chunked content
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# placeholder of the search bar
|
||||
placeholder = ""
|
||||
# max number of results length
|
||||
|
@ -947,6 +947,8 @@ enableEmoji = true
|
|||
algoliasearchJS = ""
|
||||
# lazysizes@5.2.0 https://github.com/aFarkas/lazysizes
|
||||
lazysizesJS = ""
|
||||
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
|
||||
objectFitImagesJS = ""
|
||||
# twemoji@12.1.5 https://github.com/twitter/twemoji
|
||||
twemojiJS = ""
|
||||
# lightgallery.js@1.1.3 https://github.com/sachinchoolur/lightgallery.js
|
||||
|
@ -960,7 +962,7 @@ enableEmoji = true
|
|||
clipboardJS = ""
|
||||
# sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js
|
||||
sharerJS = ""
|
||||
# typeit@7.0.3 https://github.com/alexmacarthur/typeit
|
||||
# typeit@6.5.1 https://github.com/alexmacarthur/typeit
|
||||
typeitJS = ""
|
||||
# katex@0.11.1 https://katex.org/
|
||||
katexCSS = ""
|
||||
|
@ -974,7 +976,7 @@ enableEmoji = true
|
|||
# echarts@4.7.0 https://echarts.apache.org/
|
||||
echartsJS = ""
|
||||
echartsMacaronsJS = ""
|
||||
# mapbox-gl@1.9.1 https://docs.mapbox.com/mapbox-gl-js
|
||||
# mapbox-gl@1.10.0 https://docs.mapbox.com/mapbox-gl-js
|
||||
mapboxGLCSS = ""
|
||||
mapboxGLJS = ""
|
||||
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
|
||||
|
@ -985,7 +987,7 @@ enableEmoji = true
|
|||
# gitalk@1.6.2 https://github.com/gitalk/gitalk
|
||||
gitalkCSS = ""
|
||||
gitalkJS = ""
|
||||
# valine@1.4.9 https://valine.js.org/
|
||||
# valine@1.4.14 https://valine.js.org/
|
||||
valineJS = ""
|
||||
|
||||
# Markup related configuration in Hugo
|
||||
|
|
|
@ -97,6 +97,7 @@ Thanks to the authors of following resources included in the theme:
|
|||
* [Lunr.js](https://lunrjs.com/)
|
||||
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
|
||||
* [lazysizes](https://github.com/aFarkas/lazysizes)
|
||||
* [object-fit-images](https://github.com/fregante/object-fit-images)
|
||||
* [Twemoji](https://github.com/twitter/twemoji)
|
||||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
|
||||
|
|
|
@ -102,6 +102,7 @@ Thanks to the authors of following resources included in the theme:
|
|||
* [Lunr.js](https://lunrjs.com/)
|
||||
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
|
||||
* [lazysizes](https://github.com/aFarkas/lazysizes)
|
||||
* [object-fit-images](https://github.com/fregante/object-fit-images)
|
||||
* [Twemoji](https://github.com/twitter/twemoji)
|
||||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
|
||||
|
|
|
@ -97,6 +97,7 @@ LoveIt 主题中用到了以下项目,感谢它们的作者:
|
|||
* [Lunr.js](https://lunrjs.com/)
|
||||
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
|
||||
* [lazysizes](https://github.com/aFarkas/lazysizes)
|
||||
* [object-fit-images](https://github.com/fregante/object-fit-images)
|
||||
* [Twemoji](https://github.com/twitter/twemoji)
|
||||
* [lightgallery.js](https://github.com/sachinchoolur/lightgallery.js)
|
||||
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
|
||||
|
|
|
@ -222,7 +222,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
# type of search engine ("lunr", "algolia")
|
||||
type = "lunr"
|
||||
# max index length of the chunked content
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# placeholder of the search bar
|
||||
placeholder = ""
|
||||
# {{< version 0.2.1 >}} max number of results length
|
||||
|
@ -587,6 +587,8 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
algoliasearchJS = ""
|
||||
# {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0
|
||||
lazysizesJS = ""
|
||||
# {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4
|
||||
objectFitImagesJS = ""
|
||||
# {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5
|
||||
twemojiJS = ""
|
||||
# {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3
|
||||
|
@ -600,7 +602,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
clipboardJS = ""
|
||||
# {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0
|
||||
sharerJS = ""
|
||||
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.3
|
||||
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@6.5.1
|
||||
typeitJS = ""
|
||||
# {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1
|
||||
katexCSS = ""
|
||||
|
@ -614,7 +616,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
# {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0
|
||||
echartsJS = ""
|
||||
echartsMacaronsJS = ""
|
||||
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.9.1
|
||||
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0
|
||||
mapboxGLCSS = ""
|
||||
mapboxGLJS = ""
|
||||
# {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1
|
||||
|
@ -625,7 +627,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
# {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2
|
||||
gitalkCSS = ""
|
||||
gitalkJS = ""
|
||||
# {{< link "https://valine.js.org/" "valine" >}}@1.4.9
|
||||
# {{< link "https://valine.js.org/" "valine" >}}@1.4.14
|
||||
valineJS = ""
|
||||
|
||||
# Markup related config in Hugo
|
||||
|
@ -972,7 +974,7 @@ Here is the search configuration in your [site configuration](#site-configuratio
|
|||
# type of search engine ("lunr", "algolia")
|
||||
type = "lunr"
|
||||
# max index length of the chunked content
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# placeholder of the search bar
|
||||
placeholder = ""
|
||||
# {{< version 0.2.1 >}} max number of results length
|
||||
|
@ -992,8 +994,8 @@ The following is a comparison of two search engines:
|
|||
but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library)
|
||||
* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength`
|
||||
|
||||
{{< version 0.2.1 >}} The content of the post is separated by `h2` HTML tag to improve query performance and basically implement full-text search.
|
||||
`contentLength` is used to limit the max index length of the part starting with `h2` HTML tag.
|
||||
{{< version 0.2.3 >}} The content of the post is separated by `h2` and `h3` HTML tag to improve query performance and basically implement full-text search.
|
||||
`contentLength` is used to limit the max index length of the part starting with `h2` and `h3` HTML tag.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "Tips about algolia" >}}
|
||||
|
|
|
@ -227,7 +227,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
# type of search engine ("lunr", "algolia")
|
||||
type = "lunr"
|
||||
# max index length of the chunked content
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# placeholder of the search bar
|
||||
placeholder = ""
|
||||
# {{< version 0.2.1 >}} max number of results length
|
||||
|
@ -592,6 +592,8 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
algoliasearchJS = ""
|
||||
# {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0
|
||||
lazysizesJS = ""
|
||||
# {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4
|
||||
objectFitImagesJS = ""
|
||||
# {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5
|
||||
twemojiJS = ""
|
||||
# {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3
|
||||
|
@ -605,7 +607,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
clipboardJS = ""
|
||||
# {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0
|
||||
sharerJS = ""
|
||||
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.3
|
||||
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@6.5.1
|
||||
typeitJS = ""
|
||||
# {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1
|
||||
katexCSS = ""
|
||||
|
@ -619,7 +621,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
# {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0
|
||||
echartsJS = ""
|
||||
echartsMacaronsJS = ""
|
||||
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.9.1
|
||||
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0
|
||||
mapboxGLCSS = ""
|
||||
mapboxGLJS = ""
|
||||
# {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1
|
||||
|
@ -630,7 +632,7 @@ Please open the code block below to view the complete sample configuration :(far
|
|||
# {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2
|
||||
gitalkCSS = ""
|
||||
gitalkJS = ""
|
||||
# {{< link "https://valine.js.org/" "valine" >}}@1.4.9
|
||||
# {{< link "https://valine.js.org/" "valine" >}}@1.4.14
|
||||
valineJS = ""
|
||||
|
||||
# Markup related config in Hugo
|
||||
|
@ -977,7 +979,7 @@ Here is the search configuration in your [site configuration](#site-configuratio
|
|||
# type of search engine ("lunr", "algolia")
|
||||
type = "lunr"
|
||||
# max index length of the chunked content
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# placeholder of the search bar
|
||||
placeholder = ""
|
||||
# {{< version 0.2.1 >}} max number of results length
|
||||
|
@ -997,8 +999,8 @@ The following is a comparison of two search engines:
|
|||
but high bandwidth and low performance (Especially for Chinese which needs a large segmentit library)
|
||||
* `algolia`: high performance and low bandwidth, but need to synchronize `index.json` and limit for `contentLength`
|
||||
|
||||
{{< version 0.2.1 >}} The content of the post is separated by `h2` HTML tag to improve query performance and basically implement full-text search.
|
||||
`contentLength` is used to limit the max index length of the part starting with `h2` HTML tag.
|
||||
{{< version 0.2.3 >}} The content of the post is separated by `h2` and `h3` HTML tag to improve query performance and basically implement full-text search.
|
||||
`contentLength` is used to limit the max index length of the part starting with `h2` and `h3` HTML tag.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "Tips about algolia" >}}
|
||||
|
|
|
@ -225,7 +225,7 @@ hugo
|
|||
# 搜索引擎的类型 ("lunr", "algolia")
|
||||
type = "lunr"
|
||||
# 文章内容最长索引长度
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# 搜索框的占位提示语
|
||||
placeholder = ""
|
||||
# 最大结果数目
|
||||
|
@ -590,6 +590,8 @@ hugo
|
|||
algoliasearchJS = ""
|
||||
# {{< link "https://github.com/aFarkas/lazysizes" "lazysizes" >}}@5.2.0
|
||||
lazysizesJS = ""
|
||||
# {{< version 0.2.3 >}} {{< link "https://github.com/fregante/object-fit-images" "object-fit-images" >}}@3.2.4
|
||||
objectFitImagesJS = ""
|
||||
# {{< version 0.2.0 >}} {{< link "https://github.com/twitter/twemoji" "twemoji" >}}@12.1.5
|
||||
twemojiJS = ""
|
||||
# {{< link "https://github.com/sachinchoolur/lightgallery.js" "lightgallery.js" >}}@1.1.3
|
||||
|
@ -603,7 +605,7 @@ hugo
|
|||
clipboardJS = ""
|
||||
# {{< link "https://github.com/ellisonleao/sharer.js" "sharer.js" >}}@0.4.0
|
||||
sharerJS = ""
|
||||
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@7.0.3
|
||||
# {{< link "https://github.com/alexmacarthur/typeit" "typeit" >}}@6.5.1
|
||||
typeitJS = ""
|
||||
# {{< link "https://github.com/KaTeX/KaTeX" "katex" >}}@0.11.1
|
||||
katexCSS = ""
|
||||
|
@ -617,7 +619,7 @@ hugo
|
|||
# {{< link "https://echarts.apache.org/" "echarts" >}}@4.7.0
|
||||
echartsJS = ""
|
||||
echartsMacaronsJS = ""
|
||||
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.9.1
|
||||
# {{< version 0.2.0 >}} {{< link "https://docs.mapbox.com/mapbox-gl-js" mapbox-gl >}}@1.10.0
|
||||
mapboxGLCSS = ""
|
||||
mapboxGLJS = ""
|
||||
# {{< link "https://github.com/MoePlayer/APlayer" "aplayer" >}}@1.10.1
|
||||
|
@ -628,7 +630,7 @@ hugo
|
|||
# {{< link "https://github.com/gitalk/gitalk" "gitalk" >}}@1.6.2
|
||||
gitalkCSS = ""
|
||||
gitalkJS = ""
|
||||
# {{< link "https://valine.js.org/" "valine" >}}@1.4.9
|
||||
# {{< link "https://valine.js.org/" "valine" >}}@1.4.14
|
||||
valineJS = ""
|
||||
|
||||
# Hugo 解析文档的配置
|
||||
|
@ -977,7 +979,7 @@ defaultContentLanguage = "zh-cn"
|
|||
# 搜索引擎的类型 ("lunr", "algolia")
|
||||
type = "lunr"
|
||||
# 文章内容最长索引长度
|
||||
contentLength = 5000
|
||||
contentLength = 4000
|
||||
# 搜索框的占位提示语
|
||||
placeholder = ""
|
||||
# 最大结果数目
|
||||
|
@ -996,8 +998,8 @@ defaultContentLanguage = "zh-cn"
|
|||
* `lunr`: 简单, 无需同步 `index.json`, 没有 `contentLength` 的限制, 但占用带宽大且性能低 (特别是中文需要一个较大的分词依赖库)
|
||||
* `algolia`: 高性能并且占用带宽低, 但需要同步 `index.json` 且有 `contentLength` 的限制
|
||||
|
||||
{{< version 0.2.1 >}} 文章内容被 `h2` HTML 标签切分来提供查询效果并且基本实现全文搜索.
|
||||
`contentLength` 用来限制 `h2` HTML 标签开头的内容部分的最大长度.
|
||||
{{< version 0.2.3 >}} 文章内容被 `h2` 和 `h3` HTML 标签切分来提供查询效果并且基本实现全文搜索.
|
||||
`contentLength` 用来限制 `h2` 和 `h3` HTML 标签开头的内容部分的最大长度.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< admonition tip "关于 algolia 的使用技巧" >}}
|
||||
|
|
|
@ -28,7 +28,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}
|
||||
## 1 figure {#figure}
|
||||
|
||||
[Documentation of `figure`](https://gohugo.io/content-management/shortcodes#figure)
|
||||
|
||||
|
@ -53,7 +53,7 @@ The HTML looks like this:
|
|||
</figure>
|
||||
```
|
||||
|
||||
## gist
|
||||
## 2 gist
|
||||
|
||||
[Documentation of `gist`](https://gohugo.io/content-management/shortcodes#gist)
|
||||
|
||||
|
@ -73,7 +73,7 @@ The HTML looks like this:
|
|||
<script type="application/javascript" src="https://gist.github.com/spf13/7896402.js"></script>
|
||||
```
|
||||
|
||||
## highlight
|
||||
## 3 highlight
|
||||
|
||||
[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes#instagram)
|
||||
|
||||
|
@ -105,7 +105,7 @@ The rendered output looks like this:
|
|||
</section>
|
||||
{{< /highlight >}}
|
||||
|
||||
## instagram
|
||||
## 4 instagram
|
||||
|
||||
[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes#instagram)
|
||||
|
||||
|
@ -119,7 +119,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< instagram BWNjjyYFxVx hidecaption >}}
|
||||
|
||||
## param
|
||||
## 5 param
|
||||
|
||||
[Documentation of `param`](https://gohugo.io/content-management/shortcodes#param)
|
||||
|
||||
|
@ -133,11 +133,11 @@ The rendered output looks like this:
|
|||
|
||||
{{< param description >}}
|
||||
|
||||
## ref and relref {#ref-and-relref}
|
||||
## 6 ref and relref {#ref-and-relref}
|
||||
|
||||
[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes#ref-and-relref)
|
||||
|
||||
## tweet
|
||||
## 7 tweet
|
||||
|
||||
[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes#tweet)
|
||||
|
||||
|
@ -151,7 +151,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< tweet 877500564405444608 >}}
|
||||
|
||||
## vimeo
|
||||
## 8 vimeo
|
||||
|
||||
[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes#vimeo)
|
||||
|
||||
|
@ -165,7 +165,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< vimeo 146022717 >}}
|
||||
|
||||
## youtube
|
||||
## 9 youtube
|
||||
|
||||
[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes#youtube)
|
||||
|
||||
|
|
|
@ -33,7 +33,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}
|
||||
## 1 figure {#figure}
|
||||
|
||||
[Documentation of `figure`](https://gohugo.io/content-management/shortcodes#figure)
|
||||
|
||||
|
@ -58,7 +58,7 @@ The HTML looks like this:
|
|||
</figure>
|
||||
```
|
||||
|
||||
## gist
|
||||
## 2 gist
|
||||
|
||||
[Documentation of `gist`](https://gohugo.io/content-management/shortcodes#gist)
|
||||
|
||||
|
@ -78,7 +78,7 @@ The HTML looks like this:
|
|||
<script type="application/javascript" src="https://gist.github.com/spf13/7896402.js"></script>
|
||||
```
|
||||
|
||||
## highlight
|
||||
## 3 highlight
|
||||
|
||||
[Documentation of `highlight`](https://gohugo.io/content-management/shortcodes#instagram)
|
||||
|
||||
|
@ -110,7 +110,7 @@ The rendered output looks like this:
|
|||
</section>
|
||||
{{< /highlight >}}
|
||||
|
||||
## instagram
|
||||
## 4 instagram
|
||||
|
||||
[Documentation of `instagram`](https://gohugo.io/content-management/shortcodes#instagram)
|
||||
|
||||
|
@ -124,7 +124,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< instagram BWNjjyYFxVx hidecaption >}}
|
||||
|
||||
## param
|
||||
## 5 param
|
||||
|
||||
[Documentation of `param`](https://gohugo.io/content-management/shortcodes#param)
|
||||
|
||||
|
@ -138,11 +138,11 @@ The rendered output looks like this:
|
|||
|
||||
{{< param description >}}
|
||||
|
||||
## ref and relref {#ref-and-relref}
|
||||
## 6 ref and relref {#ref-and-relref}
|
||||
|
||||
[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes#ref-and-relref)
|
||||
|
||||
## tweet
|
||||
## 7 tweet
|
||||
|
||||
[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes#tweet)
|
||||
|
||||
|
@ -156,7 +156,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< tweet 877500564405444608 >}}
|
||||
|
||||
## vimeo
|
||||
## 8 vimeo
|
||||
|
||||
[Documentation of `vimeo`](https://gohugo.io/content-management/shortcodes#vimeo)
|
||||
|
||||
|
@ -170,7 +170,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< vimeo 146022717 >}}
|
||||
|
||||
## youtube
|
||||
## 9 youtube
|
||||
|
||||
[Documentation of `youtube`](https://gohugo.io/content-management/shortcodes#youtube)
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ shortcode 是一个简单代码段, 可以生成合理的 HTML 代码, 并且符
|
|||
Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见的用法.
|
||||
提供这些 shortcodes 是为了方便保持你的 Markdown 内容简洁.
|
||||
|
||||
## figure {#figure}
|
||||
## 1 figure {#figure}
|
||||
|
||||
[`figure` 的文档](https://gohugo.io/content-management/shortcodes#figure)
|
||||
|
||||
|
@ -54,7 +54,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
</figure>
|
||||
```
|
||||
|
||||
## gist
|
||||
## 2 gist
|
||||
|
||||
[`gist` 的文档](https://gohugo.io/content-management/shortcodes#gist)
|
||||
|
||||
|
@ -74,7 +74,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
<script type="application/javascript" src="https://gist.github.com/spf13/7896402.js"></script>
|
||||
```
|
||||
|
||||
## highlight
|
||||
## 3 highlight
|
||||
|
||||
[`highlight` 的文档](https://gohugo.io/content-management/shortcodes#instagram)
|
||||
|
||||
|
@ -106,7 +106,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
</section>
|
||||
{{< /highlight >}}
|
||||
|
||||
## instagram
|
||||
## 4 instagram
|
||||
|
||||
[`instagram` 的文档](https://gohugo.io/content-management/shortcodes#instagram)
|
||||
|
||||
|
@ -120,7 +120,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
|
||||
{{< instagram BWNjjyYFxVx hidecaption >}}
|
||||
|
||||
## param
|
||||
## 5 param
|
||||
|
||||
[`param` 的文档](https://gohugo.io/content-management/shortcodes#param)
|
||||
|
||||
|
@ -134,11 +134,11 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
|
||||
{{< param description >}}
|
||||
|
||||
## ref 和 relref {#ref-and-relref}
|
||||
## 6 ref 和 relref {#ref-and-relref}
|
||||
|
||||
[`ref` 和 `relref` 的文档](https://gohugo.io/content-management/shortcodes#ref-and-relref)
|
||||
|
||||
## tweet
|
||||
## 7 tweet
|
||||
|
||||
[`tweet` 的文档](https://gohugo.io/content-management/shortcodes#tweet)
|
||||
|
||||
|
@ -152,7 +152,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
|
||||
{{< tweet 877500564405444608 >}}
|
||||
|
||||
## vimeo
|
||||
## 8 vimeo
|
||||
|
||||
[`vimeo` 的文档](https://gohugo.io/content-management/shortcodes#vimeo)
|
||||
|
||||
|
@ -166,7 +166,7 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
|
|||
|
||||
{{< vimeo 146022717 >}}
|
||||
|
||||
## youtube
|
||||
## 9 youtube
|
||||
|
||||
[`youtube` 的文档](https://gohugo.io/content-management/shortcodes#youtube)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ lightgallery: true
|
|||
|
||||
<!--more-->
|
||||
|
||||
## style
|
||||
## 1 style
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -48,7 +48,7 @@ The rendered output looks like this:
|
|||
This is a **right-aligned** paragraph.
|
||||
{{< /style >}}
|
||||
|
||||
## link
|
||||
## 2 link
|
||||
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
|
@ -112,7 +112,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
|
||||
## 3 image {#image}
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -182,7 +182,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
|
||||
## 4 admonition
|
||||
|
||||
The `admonition` shortcode supports **12** types of banners to help you put notice in your page.
|
||||
|
||||
|
@ -268,13 +268,13 @@ The rendered output looks like this:
|
|||
A **tip** banner
|
||||
{{< /admonition >}}
|
||||
|
||||
## mermaid
|
||||
## 5 mermaid
|
||||
|
||||
[mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
|
||||
|
||||
Just insert your mermaid code in the `mermaid` shortcode and that’s it.
|
||||
|
||||
### Flowchart {#flowchart}
|
||||
### 5.1 Flowchart {#flowchart}
|
||||
|
||||
Example **flowchart** `mermaid` input:
|
||||
|
||||
|
@ -298,7 +298,7 @@ graph LR;
|
|||
C -->|Two| E[Result two]
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Sequence Diagram {#sequence-diagram}
|
||||
### 5.2 Sequence Diagram {#sequence-diagram}
|
||||
|
||||
Example **sequence diagram** `mermaid` input:
|
||||
|
||||
|
@ -334,7 +334,7 @@ sequenceDiagram
|
|||
Bob-->John: Jolly good!
|
||||
{{< /mermaid >}}
|
||||
|
||||
### GANTT {#gantt}
|
||||
### 5.3 GANTT {#gantt}
|
||||
|
||||
Example **GANTT** `mermaid` input:
|
||||
|
||||
|
@ -378,7 +378,7 @@ gantt
|
|||
Add to mermaid :1d
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Class Diagram {#class-diagram}
|
||||
### 5.4 Class Diagram {#class-diagram}
|
||||
|
||||
Example **class diagram** `mermaid` input:
|
||||
|
||||
|
@ -420,7 +420,7 @@ classDiagram
|
|||
Class08 <--> C2: Cool label
|
||||
{{< /mermaid >}}
|
||||
|
||||
### State Diagram {#state-diagram}
|
||||
### 5.5 State Diagram {#state-diagram}
|
||||
|
||||
Example **state diagram** `mermaid` input:
|
||||
|
||||
|
@ -448,7 +448,7 @@ stateDiagram
|
|||
Crash --> [*]
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Git Graph {#git-graph}
|
||||
### 5.6 Git Graph {#git-graph}
|
||||
|
||||
Example **git graph** `mermaid` input:
|
||||
|
||||
|
@ -494,7 +494,7 @@ end
|
|||
merge newbranch
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Pie {#pie}
|
||||
### 5.7 Pie {#pie}
|
||||
|
||||
Example **pie** `mermaid` input:
|
||||
|
||||
|
@ -516,7 +516,7 @@ pie
|
|||
"Rats" : 15
|
||||
{{< /mermaid >}}
|
||||
|
||||
## echarts
|
||||
## 6 echarts
|
||||
|
||||
[ECharts](https://echarts.apache.org/) is a library helping you to generate interactive data visualization.
|
||||
|
||||
|
@ -904,7 +904,7 @@ The `echarts` shortcode has also the following named parameters:
|
|||
|
||||
{{< version 0.2.0 >}} Height of the data visualization, default value is `30rem`.
|
||||
|
||||
## mapbox
|
||||
## 7 mapbox
|
||||
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
|
@ -960,13 +960,21 @@ The `mapbox` shortcode has the following named parameters to use Mapbox GL JS:
|
|||
|
||||
Height of the map, default value is `20rem`.
|
||||
|
||||
Example `mapbox` input:
|
||||
Example simple `mapbox` input:
|
||||
|
||||
```markdown
|
||||
{{</* mapbox 121.485 31.233 12 */>}}
|
||||
Or
|
||||
{{</* mapbox lng=121.485 lat=31.233 zoom=12 */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< mapbox 121.485 31.233 12 >}}
|
||||
|
||||
Example `mapbox` input with the custom style:
|
||||
|
||||
```markdown
|
||||
{{</* mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/navigation-preview-day-v4" "mapbox://styles/mapbox/navigation-preview-night-v4" */>}}
|
||||
Or
|
||||
{{</* mapbox lng=-122.252 lat=37.453 zoom=10 marked=false light-style="mapbox://styles/mapbox/navigation-preview-day-v4" dark-style="mapbox://styles/mapbox/navigation-preview-night-v4" */>}}
|
||||
|
@ -974,17 +982,15 @@ Or
|
|||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< mapbox 121.485 31.233 12 >}}
|
||||
|
||||
{{< 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
|
||||
## 8 music
|
||||
|
||||
The `music` shortcode embeds a responsive music player based on [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS).
|
||||
|
||||
There are three ways to use it the `music` shortcode.
|
||||
|
||||
### Custom Music URL {#custom-music-url}
|
||||
### 8.1 Custom Music URL {#custom-music-url}
|
||||
|
||||
The `music` shortcode has the following named parameters by custom music URL:
|
||||
|
||||
|
@ -1007,14 +1013,14 @@ The `music` shortcode has the following named parameters by custom music URL:
|
|||
Example `music` input by custom music URL:
|
||||
|
||||
```markdown
|
||||
{{</* music url="https://rainymood.com/audio1110/0.m4a" name=rainymood artist=rainymood cover="https://rainymood.com/i/badge.jpg" */>}}
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< music url="https://rainymood.com/audio1110/0.m4a" name=rainymood artist=rainymood cover="https://rainymood.com/i/badge.jpg" >}}
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" >}}
|
||||
|
||||
### Music Platform URL Automatic Identification {#automatic-identification}
|
||||
### 8.2 Music Platform URL Automatic Identification {#automatic-identification}
|
||||
|
||||
The `music` shortcode has one named parameter by music platform URL automatic identification:
|
||||
|
||||
|
@ -1035,7 +1041,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< music auto="https://music.163.com/#/playlist?id=60198" >}}
|
||||
|
||||
### Custom Server, Type and ID {#custom-server}
|
||||
### 8.3 Custom Server, Type and ID {#custom-server}
|
||||
|
||||
The `music` shortcode has the following named parameters by custom music platform:
|
||||
|
||||
|
@ -1067,7 +1073,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< music netease song 1868553 >}}
|
||||
|
||||
### Other Parameters {#other-parameters}
|
||||
### 8.4 Other Parameters {#other-parameters}
|
||||
|
||||
The `music` shortcode has other named parameters applying to the above three ways:
|
||||
|
||||
|
@ -1117,7 +1123,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
|
||||
## 9 bilibili
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -1160,13 +1166,13 @@ The rendered output looks like this:
|
|||
|
||||
{{< bilibili id=BV1TJ411C7An p=3 >}}
|
||||
|
||||
## typeit
|
||||
## 10 typeit
|
||||
|
||||
The `typeit` shortcode provides typing animation based on [TypeIt](https://typeitjs.com/).
|
||||
|
||||
Just insert your content in the `typeit` shortcode and that’s it.
|
||||
|
||||
### Simple Content {#simple-content}
|
||||
### 10.1 Simple Content {#simple-content}
|
||||
|
||||
Simple content is allowed in `Markdown` format and **without** rich block content such as images and more...
|
||||
|
||||
|
@ -1200,7 +1206,7 @@ The rendered output looks like this:
|
|||
This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)...
|
||||
{{< /typeit >}}
|
||||
|
||||
### Code Content {#code-content}
|
||||
### 10.2 Code Content {#code-content}
|
||||
|
||||
Code content is allowed and will be highlighted by named parameter `code` for the type of code language.
|
||||
|
||||
|
@ -1226,7 +1232,7 @@ public class HelloWorld {
|
|||
}
|
||||
{{< /typeit >}}
|
||||
|
||||
### Group Content {#group-content}
|
||||
### 10.3 Group Content {#group-content}
|
||||
|
||||
All typing animations start at the same time by default.
|
||||
But sometimes you may want to start a set of `typeit` contents in order.
|
||||
|
|
|
@ -25,7 +25,7 @@ Sorry, this article has not been completely translated into **French**.
|
|||
Welcome to take the time to propose a translation by [:(fas fa-code-branch fa-fw): making a PR](https://github.com/dillonzq/LoveIt/pulls) to the theme!
|
||||
{{< /admonition >}}
|
||||
|
||||
## style
|
||||
## 1 style
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -53,7 +53,7 @@ The rendered output looks like this:
|
|||
This is a **right-aligned** paragraph.
|
||||
{{< /style >}}
|
||||
|
||||
## link
|
||||
## 2 link
|
||||
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
|
@ -117,7 +117,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
|
||||
## 3 image {#image}
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -187,7 +187,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
|
||||
## 4 admonition
|
||||
|
||||
The `admonition` shortcode supports **12** types of banners to help you put notice in your page.
|
||||
|
||||
|
@ -273,13 +273,13 @@ The rendered output looks like this:
|
|||
A **tip** banner
|
||||
{{< /admonition >}}
|
||||
|
||||
## mermaid
|
||||
## 5 mermaid
|
||||
|
||||
[mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
|
||||
|
||||
Just insert your mermaid code in the `mermaid` shortcode and that’s it.
|
||||
|
||||
### Flowchart {#flowchart}
|
||||
### 5.1 Flowchart {#flowchart}
|
||||
|
||||
Example **flowchart** `mermaid` input:
|
||||
|
||||
|
@ -303,7 +303,7 @@ graph LR;
|
|||
C -->|Two| E[Result two]
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Sequence Diagram {#sequence-diagram}
|
||||
### 5.2 Sequence Diagram {#sequence-diagram}
|
||||
|
||||
Example **sequence diagram** `mermaid` input:
|
||||
|
||||
|
@ -339,7 +339,7 @@ sequenceDiagram
|
|||
Bob-->John: Jolly good!
|
||||
{{< /mermaid >}}
|
||||
|
||||
### GANTT {#gantt}
|
||||
### 5.3 GANTT {#gantt}
|
||||
|
||||
Example **GANTT** `mermaid` input:
|
||||
|
||||
|
@ -383,7 +383,7 @@ gantt
|
|||
Add to mermaid :1d
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Class Diagram {#class-diagram}
|
||||
### 5.4 Class Diagram {#class-diagram}
|
||||
|
||||
Example **class diagram** `mermaid` input:
|
||||
|
||||
|
@ -425,7 +425,7 @@ classDiagram
|
|||
Class08 <--> C2: Cool label
|
||||
{{< /mermaid >}}
|
||||
|
||||
### State Diagram {#state-diagram}
|
||||
### 5.5 State Diagram {#state-diagram}
|
||||
|
||||
Example **state diagram** `mermaid` input:
|
||||
|
||||
|
@ -453,7 +453,7 @@ stateDiagram
|
|||
Crash --> [*]
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Git Graph {#git-graph}
|
||||
### 5.6 Git Graph {#git-graph}
|
||||
|
||||
Example **git graph** `mermaid` input:
|
||||
|
||||
|
@ -499,7 +499,7 @@ end
|
|||
merge newbranch
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Pie {#pie}
|
||||
### 5.7 Pie {#pie}
|
||||
|
||||
Example **pie** `mermaid` input:
|
||||
|
||||
|
@ -521,7 +521,7 @@ pie
|
|||
"Rats" : 15
|
||||
{{< /mermaid >}}
|
||||
|
||||
## echarts
|
||||
## 6 echarts
|
||||
|
||||
[ECharts](https://echarts.apache.org/) is a library helping you to generate interactive data visualization.
|
||||
|
||||
|
@ -909,7 +909,7 @@ The `echarts` shortcode has also the following named parameters:
|
|||
|
||||
{{< version 0.2.0 >}} Height of the data visualization, default value is `30rem`.
|
||||
|
||||
## mapbox
|
||||
## 7 mapbox
|
||||
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
|
@ -965,13 +965,21 @@ The `mapbox` shortcode has the following named parameters to use Mapbox GL JS:
|
|||
|
||||
Height of the map, default value is `20rem`.
|
||||
|
||||
Example `mapbox` input:
|
||||
Example simple `mapbox` input:
|
||||
|
||||
```markdown
|
||||
{{</* mapbox 121.485 31.233 12 */>}}
|
||||
Or
|
||||
{{</* mapbox lng=121.485 lat=31.233 zoom=12 */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< mapbox 121.485 31.233 12 >}}
|
||||
|
||||
Example `mapbox` input with the custom style:
|
||||
|
||||
```markdown
|
||||
{{</* mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/navigation-preview-day-v4" "mapbox://styles/mapbox/navigation-preview-night-v4" */>}}
|
||||
Or
|
||||
{{</* mapbox lng=-122.252 lat=37.453 zoom=10 marked=false light-style="mapbox://styles/mapbox/navigation-preview-day-v4" dark-style="mapbox://styles/mapbox/navigation-preview-night-v4" */>}}
|
||||
|
@ -979,17 +987,15 @@ Or
|
|||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< mapbox 121.485 31.233 12 >}}
|
||||
|
||||
{{< 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
|
||||
## 8 music
|
||||
|
||||
The `music` shortcode embeds a responsive music player based on [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS).
|
||||
|
||||
There are three ways to use it the `music` shortcode.
|
||||
|
||||
### Custom Music URL {#custom-music-url}
|
||||
### 8.1 Custom Music URL {#custom-music-url}
|
||||
|
||||
The `music` shortcode has the following named parameters by custom music URL:
|
||||
|
||||
|
@ -1012,14 +1018,14 @@ The `music` shortcode has the following named parameters by custom music URL:
|
|||
Example `music` input by custom music URL:
|
||||
|
||||
```markdown
|
||||
{{</* music url="https://rainymood.com/audio1110/0.m4a" name=rainymood artist=rainymood cover="https://rainymood.com/i/badge.jpg" */>}}
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< music url="https://rainymood.com/audio1110/0.m4a" name=rainymood artist=rainymood cover="https://rainymood.com/i/badge.jpg" >}}
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" >}}
|
||||
|
||||
### Music Platform URL Automatic Identification {#automatic-identification}
|
||||
### 8.2 Music Platform URL Automatic Identification {#automatic-identification}
|
||||
|
||||
The `music` shortcode has one named parameter by music platform URL automatic identification:
|
||||
|
||||
|
@ -1040,7 +1046,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< music auto="https://music.163.com/#/playlist?id=60198" >}}
|
||||
|
||||
### Custom Server, Type and ID {#custom-server}
|
||||
### 8.3 Custom Server, Type and ID {#custom-server}
|
||||
|
||||
The `music` shortcode has the following named parameters by custom music platform:
|
||||
|
||||
|
@ -1072,7 +1078,7 @@ The rendered output looks like this:
|
|||
|
||||
{{< music netease song 1868553 >}}
|
||||
|
||||
### Other Parameters {#other-parameters}
|
||||
### 8.4 Other Parameters {#other-parameters}
|
||||
|
||||
The `music` shortcode has other named parameters applying to the above three ways:
|
||||
|
||||
|
@ -1122,7 +1128,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
|
||||
## 9 bilibili
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -1165,13 +1171,13 @@ The rendered output looks like this:
|
|||
|
||||
{{< bilibili id=BV1TJ411C7An p=3 >}}
|
||||
|
||||
## typeit
|
||||
## 10 typeit
|
||||
|
||||
The `typeit` shortcode provides typing animation based on [TypeIt](https://typeitjs.com/).
|
||||
|
||||
Just insert your content in the `typeit` shortcode and that’s it.
|
||||
|
||||
### Simple Content {#simple-content}
|
||||
### 10.1 Simple Content {#simple-content}
|
||||
|
||||
Simple content is allowed in `Markdown` format and **without** rich block content such as images and more...
|
||||
|
||||
|
@ -1205,7 +1211,7 @@ The rendered output looks like this:
|
|||
This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)...
|
||||
{{< /typeit >}}
|
||||
|
||||
### Code Content {#code-content}
|
||||
### 10.2 Code Content {#code-content}
|
||||
|
||||
Code content is allowed and will be highlighted by named parameter `code` for the type of code language.
|
||||
|
||||
|
@ -1231,7 +1237,7 @@ public class HelloWorld {
|
|||
}
|
||||
{{< /typeit >}}
|
||||
|
||||
### Group Content {#group-content}
|
||||
### 10.3 Group Content {#group-content}
|
||||
|
||||
All typing animations start at the same time by default.
|
||||
But sometimes you may want to start a set of `typeit` contents in order.
|
||||
|
|
|
@ -23,7 +23,7 @@ mapbox:
|
|||
|
||||
<!--more-->
|
||||
|
||||
## style
|
||||
## 1 style
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -50,7 +50,7 @@ This is a **right-aligned** paragraph.
|
|||
This is a **right-aligned** paragraph.
|
||||
{{< /style >}}
|
||||
|
||||
## link
|
||||
## 2 link
|
||||
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
|
@ -115,7 +115,7 @@ This is a **right-aligned** paragraph.
|
|||
|
||||
{{< link "https://github.com/upstage/" Upstage "Visit Upstage!" >}}
|
||||
|
||||
## image
|
||||
## 3 image {#image}
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -185,7 +185,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
|
||||
## 4 admonition
|
||||
|
||||
`admonition` shortcode 支持 **12** 种 帮助你在页面中插入提示的横幅.
|
||||
|
||||
|
@ -271,13 +271,13 @@ This is a **right-aligned** paragraph.
|
|||
一个 **技巧** 横幅
|
||||
{{< /admonition >}}
|
||||
|
||||
## mermaid
|
||||
## 5 mermaid
|
||||
|
||||
[mermaid](https://mermaidjs.github.io/) 是一个可以帮助你在文章中生成图表和流程图的库, 类似 Markdown 的语法.
|
||||
|
||||
只需将你的 mermaid 代码插入 `mermaid` shortcode 中即可.
|
||||
|
||||
### 流程图 {#flowchart}
|
||||
### 5.1 流程图 {#flowchart}
|
||||
|
||||
一个 **流程图** `mermaid` 示例:
|
||||
|
||||
|
@ -301,7 +301,7 @@ graph LR;
|
|||
C -->|Two| E[Result two]
|
||||
{{< /mermaid >}}
|
||||
|
||||
### 时序图 {#sequence-diagram}
|
||||
### 5.2 时序图 {#sequence-diagram}
|
||||
|
||||
一个 **时序图** `mermaid` 示例:
|
||||
|
||||
|
@ -337,7 +337,7 @@ sequenceDiagram
|
|||
Bob-->John: Jolly good!
|
||||
{{< /mermaid >}}
|
||||
|
||||
### 甘特图 {#gantt}
|
||||
### 5.3 甘特图 {#gantt}
|
||||
|
||||
一个 **甘特图** `mermaid` 示例:
|
||||
|
||||
|
@ -381,7 +381,7 @@ gantt
|
|||
Add to mermaid :1d
|
||||
{{< /mermaid >}}
|
||||
|
||||
### 类图 {#class-diagram}
|
||||
### 5.4 类图 {#class-diagram}
|
||||
|
||||
一个 **类图** `mermaid` 示例:
|
||||
|
||||
|
@ -423,7 +423,7 @@ classDiagram
|
|||
Class08 <--> C2: Cool label
|
||||
{{< /mermaid >}}
|
||||
|
||||
### 状态图 {#state-diagram}
|
||||
### 5.5 状态图 {#state-diagram}
|
||||
|
||||
一个 **状态图** `mermaid` 示例:
|
||||
|
||||
|
@ -451,7 +451,7 @@ stateDiagram
|
|||
Crash --> [*]
|
||||
{{< /mermaid >}}
|
||||
|
||||
### Git 图 {#git-graph}
|
||||
### 5.6 Git 图 {#git-graph}
|
||||
|
||||
一个 **Git 图** `mermaid` 示例:
|
||||
|
||||
|
@ -497,7 +497,7 @@ end
|
|||
merge newbranch
|
||||
{{< /mermaid >}}
|
||||
|
||||
### 饼图 {#pie}
|
||||
### 5.7 饼图 {#pie}
|
||||
|
||||
一个 **饼图** `mermaid` 示例:
|
||||
|
||||
|
@ -519,7 +519,7 @@ pie
|
|||
"Rats" : 15
|
||||
{{< /mermaid >}}
|
||||
|
||||
## echarts
|
||||
## 6 echarts
|
||||
|
||||
[ECharts](https://echarts.apache.org/) 是一个帮助你生成交互式数据可视化的库.
|
||||
|
||||
|
@ -907,7 +907,7 @@ data = [
|
|||
|
||||
{{< version 0.2.0 >}} 数据可视化的高度, 默认值是 `30rem`.
|
||||
|
||||
## mapbox
|
||||
## 7 mapbox
|
||||
|
||||
{{< version 0.2.0 >}}
|
||||
|
||||
|
@ -963,13 +963,21 @@ data = [
|
|||
|
||||
地图的高度, 默认值是 `20rem`.
|
||||
|
||||
一个 `mapbox` 示例:
|
||||
一个简单的 `mapbox` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* mapbox 121.485 31.233 12 */>}}
|
||||
或者
|
||||
{{</* mapbox lng=121.485 lat=31.233 zoom=12 */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< mapbox 121.485 31.233 12 >}}
|
||||
|
||||
一个带有自定义样式的 `mapbox` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/streets-zh-v1" */>}}
|
||||
或者
|
||||
{{</* mapbox lng=-122.252 lat=37.453 zoom=10 marked=false light-style="mapbox://styles/mapbox/streets-zh-v1" */>}}
|
||||
|
@ -977,17 +985,15 @@ data = [
|
|||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< mapbox 121.485 31.233 12 >}}
|
||||
|
||||
{{< mapbox -122.252 37.453 10 false "mapbox://styles/mapbox/streets-zh-v1?optimize=true" >}}
|
||||
|
||||
## music
|
||||
## 8 music
|
||||
|
||||
`music` shortcode 基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 提供了一个内嵌的响应式音乐播放器.
|
||||
|
||||
有三种方式使用 `music` shortcode.
|
||||
|
||||
### 自定义音乐 URL {#custom-music-url}
|
||||
### 8.1 自定义音乐 URL {#custom-music-url}
|
||||
|
||||
`music` shortcode 有以下命名参数来使用自定义音乐 URL:
|
||||
|
||||
|
@ -1010,14 +1016,14 @@ data = [
|
|||
一个使用自定义音乐 URL 的 `music` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* music url="https://rainymood.com/audio1110/0.m4a" name=rainymood artist=rainymood cover="https://rainymood.com/i/badge.jpg" */>}}
|
||||
{{</* music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< music url="https://rainymood.com/audio1110/0.m4a" name=rainymood artist=rainymood cover="https://rainymood.com/i/badge.jpg" >}}
|
||||
{{< music url="/music/Wavelength.mp3" name=Wavelength artist=oldmanyoung cover="/images/theme-documentation-extended-shortcodes/Wavelength.jpg" >}}
|
||||
|
||||
### 音乐平台 URL 的自动识别 {#automatic-identification}
|
||||
### 8.2 音乐平台 URL 的自动识别 {#automatic-identification}
|
||||
|
||||
`music` shortcode 有一个命名参数来使用音乐平台 URL 的自动识别:
|
||||
|
||||
|
@ -1037,7 +1043,7 @@ data = [
|
|||
|
||||
{{< music auto="https://music.163.com/#/playlist?id=60198" >}}
|
||||
|
||||
### 自定义音乐平台, 类型和 ID {#custom-server}
|
||||
### 8.3 自定义音乐平台, 类型和 ID {#custom-server}
|
||||
|
||||
`music` shortcode 有以下命名参数来使用自定义音乐平台:
|
||||
|
||||
|
@ -1069,7 +1075,7 @@ data = [
|
|||
|
||||
{{< music netease song 1868553 >}}
|
||||
|
||||
### 其它参数 {#other-parameters}
|
||||
### 8.4 其它参数 {#other-parameters}
|
||||
|
||||
`music` shortcode 有一些可以应用于以上三种方式的其它命名参数:
|
||||
|
||||
|
@ -1119,7 +1125,7 @@ data = [
|
|||
|
||||
音乐列表的最大高度, 默认值是 `340px`.
|
||||
|
||||
## bilibili
|
||||
## 9 bilibili
|
||||
|
||||
{{< version 0.2.0 changed >}}
|
||||
|
||||
|
@ -1161,13 +1167,13 @@ https://www.bilibili.com/video/BV1TJ411C7An?p=3
|
|||
|
||||
{{< bilibili id=BV1TJ411C7An p=3 >}}
|
||||
|
||||
## typeit
|
||||
## 10 typeit
|
||||
|
||||
`typeit` shortcode 基于 [TypeIt](https://typeitjs.com/) 提供了打字动画.
|
||||
|
||||
只需将你需要打字动画的内容插入 `typeit` shortcode 中即可.
|
||||
|
||||
### 简单内容 {#simple-content}
|
||||
### 10.1 简单内容 {#simple-content}
|
||||
|
||||
允许使用 `Markdown` 格式的简单内容, 并且 **不包含** 富文本的块内容, 例如图像等等...
|
||||
|
||||
|
@ -1201,7 +1207,7 @@ https://www.bilibili.com/video/BV1TJ411C7An?p=3
|
|||
这一个带有基于 [TypeIt](https://typeitjs.com/) 的 **打字动画** 的 *段落*...
|
||||
{{< /typeit >}}
|
||||
|
||||
### 代码内容 {#code-content}
|
||||
### 10.2 代码内容 {#code-content}
|
||||
|
||||
代码内容也是允许的, 并且通过使用参数 `code` 指定语言类型可以实习语法高亮.
|
||||
|
||||
|
@ -1227,7 +1233,7 @@ public class HelloWorld {
|
|||
}
|
||||
{{< /typeit >}}
|
||||
|
||||
### 分组内容 {#code-content}
|
||||
### 10.3 分组内容 {#code-content}
|
||||
|
||||
默认情况下, 所有打字动画都是同时开始的.
|
||||
但是有时你可能需要按顺序开始一组 `typeit` 内容的打字动画.
|
||||
|
|
Binary file not shown.
Before ![]() (image error) Size: 442 KiB After ![]() (image error) Size: 222 KiB ![]() ![]() |
Binary file not shown.
After ![]() (image error) Size: 97 KiB |
BIN
exampleSite/static/music/Wavelength.mp3
Normal file
BIN
exampleSite/static/music/Wavelength.mp3
Normal file
Binary file not shown.
Binary file not shown.
Before ![]() (image error) Size: 442 KiB After ![]() (image error) Size: 222 KiB ![]() ![]() |
|
@ -10,7 +10,7 @@
|
|||
{{- end -}}
|
||||
|
||||
{{- $params := .Params | merge .Site.Params.page -}}
|
||||
{{- .Scratch.Set "version" "0.2.2" -}}
|
||||
{{- .Scratch.Set "version" "0.2.3" -}}
|
||||
|
||||
{{- if eq hugo.Environment "production" -}}
|
||||
{{- .Scratch.Set "cdn" .Site.Params.cdn -}}
|
||||
|
|
|
@ -13,17 +13,28 @@
|
|||
{{- $index = $index | append (dict "content" . "objectID" $uri | merge $meta) -}}
|
||||
{{- end -}}
|
||||
{{- $params := .Params | merge $.Site.Params.page -}}
|
||||
{{/* Extended Markdown syntax */}}
|
||||
{{- $content := dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" -}}
|
||||
{{- range $i, $chunked := split $content "<h2 id=" -}}
|
||||
{{/* Remove line number for code */}}
|
||||
{{- $content = $content | replaceRE `<span class="lnt?"> *\d*\n?</span>` "" -}}
|
||||
{{- range $i, $contenti := split $content "<h2 id=" -}}
|
||||
{{- if gt $i 0 -}}
|
||||
{{- $chunked = printf "<h2 id=%s" $chunked -}}
|
||||
{{- $contenti = printf "<h2 id=%s" $contenti -}}
|
||||
{{- end -}}
|
||||
{{- $chunked = $chunked | plainify | htmlUnescape | replaceRE `[\n ]+` ` ` -}}
|
||||
{{- if gt $.Site.Params.search.contentLength 0 -}}
|
||||
{{- $chunked = substr $chunked 0 $.Site.Params.search.contentLength -}}
|
||||
{{- range $j, $contentj := split $contenti "<h3 id=" -}}
|
||||
{{- if gt $j 0 -}}
|
||||
{{- $contentj = printf "<h3 id=%s" $contentj -}}
|
||||
{{- end -}}
|
||||
{{/* Plainify, unescape and remove (\n, \t) */}}
|
||||
{{- $contentj = $contentj | plainify | htmlUnescape | replaceRE `[\n\t ]+` " " -}}
|
||||
{{- if gt $.Site.Params.search.contentLength 0 -}}
|
||||
{{- $contentj = substr $contentj 0 $.Site.Params.search.contentLength -}}
|
||||
{{- end -}}
|
||||
{{- if $contentj | and (ne $contentj " ") -}}
|
||||
{{- $one := printf "%s:%d:%d" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
|
||||
{{- $index = $index | append $one -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $one := printf "%s:%d" $uri $i | dict "content" $chunked "objectID" | merge $meta -}}
|
||||
{{- $index = $index | append $one -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
@ -38,6 +38,10 @@
|
|||
{{- $source := $cdn.lazysizesJS | default "lib/lazysizes/lazysizes.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
|
||||
|
||||
{{- /* object-fit-images */ -}}
|
||||
{{- $source := $cdn.objectFitImagesJS | default "lib/object-fit-images/ofi.min.js" -}}
|
||||
{{- dict "source" $source "fingerprint" $fingerprint | dict "scratch" $.Scratch "data" | partial "scratch/script.html" -}}
|
||||
|
||||
{{- /* twemoji */ -}}
|
||||
{{- if $params.twemoji -}}
|
||||
{{- $source := $cdn.twemojiJS | default "lib/twemoji/twemoji.min.js" -}}
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
"scripts": {
|
||||
"preinstall": "npx npm-force-resolutions",
|
||||
"babel": "npx babel src/js --out-file assets/js/theme.min.js --source-maps",
|
||||
"build": "npm run babel && hugo -v --source=exampleSite --themesDir ../.. -D --gc",
|
||||
"build": "npm run babel && hugo -v --source=exampleSite --themesDir ../.. --gc",
|
||||
"build-lunr-segmentit": "browserify src/lib/lunr.segmentit.js -o assets/lib/lunr/lunr.segmentit.js -t babelify --presets @babel/preset-env --presets minify",
|
||||
"start": "npm run babel && hugo server --source=exampleSite --themesDir ../.. --disableFastRender",
|
||||
"start": "npm run babel && hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender",
|
||||
"check": "htmlproofer exampleSite/public --check-html --allow-hash-href --empty-alt-ignore --disable-external",
|
||||
"copy": "rm -rf resources && cp -rf exampleSite/resources resources"
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -40,6 +40,7 @@ class Theme {
|
|||
this.resizeEventSet = new Set();
|
||||
this.switchThemeEventSet = new Set();
|
||||
this.clickMaskEventSet = new Set();
|
||||
if (objectFitImages) objectFitImages();
|
||||
}
|
||||
|
||||
initSVGIcon() {
|
||||
|
@ -56,7 +57,7 @@ class Theme {
|
|||
if ($titleElements.length) $svg.removeChild($titleElements[0]);
|
||||
$icon.parentElement.replaceChild($svg, $icon);
|
||||
})
|
||||
.catch(console.error.bind(console));
|
||||
.catch(err => { console.error(err); });
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -237,7 +238,7 @@ class Theme {
|
|||
this._algoliaIndex
|
||||
.search(query, {
|
||||
offset: 0,
|
||||
length: searchConfig.maxResultLength * 3,
|
||||
length: searchConfig.maxResultLength * 5,
|
||||
attributesToHighlight: ['title'],
|
||||
attributesToSnippet: ['content:30'],
|
||||
highlightPreTag: `<${searchConfig.highlightTag}>`,
|
||||
|
@ -586,12 +587,7 @@ class Theme {
|
|||
}
|
||||
|
||||
initSmoothScroll() {
|
||||
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'});
|
||||
}
|
||||
if (SmoothScroll) new SmoothScroll('[href^="#"]', { speed: 300, speedAsDuration: true, header: '#header-desktop' });
|
||||
}
|
||||
|
||||
onScroll() {
|
||||
|
@ -641,7 +637,6 @@ class Theme {
|
|||
this._resizeTimeout = null;
|
||||
for (let event of this.resizeEventSet) event();
|
||||
this.initToc();
|
||||
this.initSmoothScroll();
|
||||
this.initMermaid();
|
||||
this.initSearch();
|
||||
}, 100);
|
||||
|
|
Loading…
Add table
Reference in a new issue