{"id":128,"date":"2023-01-10T01:36:52","date_gmt":"2023-01-09T17:36:52","guid":{"rendered":"http:\/\/39.105.184.3\/?p=128"},"modified":"2025-12-21T01:06:38","modified_gmt":"2025-12-20T17:06:38","slug":"butterfly%e4%b8%bb%e9%a2%98%e9%a6%96%e9%a1%b5%e5%89%af%e6%a0%87%e9%a2%98%e8%87%aa%e5%ae%9a%e4%b9%89%e9%9a%8f%e6%9c%ba%e5%8f%a5%e5%ad%90","status":"publish","type":"post","link":"https:\/\/fanyiming.life\/?p=128","title":{"rendered":"Butterfly\u4e3b\u9898\u9996\u9875\u526f\u6807\u9898\u81ea\u5b9a\u4e49\u968f\u673a\u53e5\u5b50"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u524d\u8a00<\/h1>\n\n\n\n<p>\u672c\u6587\u76ee\u7684\u5728\u4e8e\uff0c\u5b9e\u73b0\u4ece\u81ea\u5b9a\u4e49\u7684\u53e5\u5b50\u5e93\u4e2d\u968f\u673a\u62bd\u53d6\u4e00\u53e5\uff0c\u4f5c\u4e3abutterfly\u8fdb\u5165\u9996\u9875\u65f6\u7684\u526f\u6807\u9898\uff0c\u8fdb\u884c\u6253\u5b57\u673a\u6548\u679c\u7684\u5c55\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" decoding=\"async\" src=\"https:\/\/eamonimgbed.oss-cn-beijing.aliyuncs.com\/img\/202301102124684.png?x-oss-process=style\/screenshots\" alt=\"image-20230110212357769\" \/><\/figure>\n\n\n\n<p>Butterfly\u5728\u4e3b\u9898\u914d\u7f6e\u6587\u4ef6<code>_config.butterfly.yml<\/code>\u4e2d\u6709\u5bf9\u526f\u6807\u9898\u8fdb\u884c\u4e2a\u6027\u5316\u8bbe\u7f6e\u7684\u9009\u9879\uff1a# the subtitle on homepage (\u4e3b\u9801subtitle)<br>subtitle:<br>enable: true<br>&nbsp;# Typewriter Effect (\u6253\u5b57\u6548\u679c)<br>effect: true<br>&nbsp;# loop (\u5faa\u74b0\u6253\u5b57)<br>loop: false<br>&nbsp;# source \u8abf\u7528\u7b2c\u4e09\u65b9\u670d\u52d9<br>&nbsp;# source: false \u95dc\u9589\u8abf\u7528<br>&nbsp;# source: 1 \u8abf\u7528\u4e00\u8a00\u7db2\u7684\u4e00\u53e5\u8a71\uff08\u7c21\u9ad4\uff09 https:\/\/hitokoto.cn\/<br>&nbsp;# source: 2 \u8abf\u7528\u4e00\u53e5\u7db2\uff08\u7c21\u9ad4\uff09 http:\/\/yijuzhan.com\/<br>&nbsp;# source: 3 \u8abf\u7528\u4eca\u65e5\u8a69\u8a5e\uff08\u7c21\u9ad4\uff09 https:\/\/www.jinrishici.com\/<br>&nbsp;# subtitle \u6703\u5148\u986f\u793a source , \u518d\u986f\u793a sub \u7684\u5167\u5bb9<br>source: false<br>&nbsp;# \u5982\u679c\u95dc\u9589\u6253\u5b57\u6548\u679c\uff0csubtitle \u53ea\u6703\u986f\u793a sub \u7684\u7b2c\u4e00\u884c\u6587\u5b57<br>sub:<br>&#8211; \u751f\u6d3b\u561b\uff0c\u90a3\u4e48\u77eb\u60c5~<\/p>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e09\u4e2a\u968f\u673a\u53e5\u5b50\u7684\u6765\u6e90\uff1a\u4e00\u8a00\u7f51\u3001\u4e00\u53e5\u7f51\u548c\u4eca\u65e5\u8bd7\u8bcd\u3002\u4f46\u662f\u6211\u60f3\u8fbe\u5230\u7684\u6548\u679c\u662f\uff0c\u8ba9\u8fd9\u4e2a\u968f\u673a\u53e5\u5b50\u7684\u6765\u6e90\u662f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u7684\uff0c\u8fd9\u6837\u5c31\u80fd\u628a\u81ea\u5df1\u6536\u85cf\u7684\u5404\u79cd\u4e2d\u4e8c\u53f0\u8bcd\u653e\u8fdb\u53bb\u4e86\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u6559\u7a0b<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u65b0\u5efa\u53e5\u5b50\u5e93\u6587\u4ef6<\/h2>\n\n\n\n<p>\u5728<code>[BlogRoot]\\source\\<\/code>\u4e0b\u521b\u5efa<code>subtitle.json<\/code>\uff0c\u91cc\u9762\u653e\u559c\u6b22\u7684\u53e5\u5b50\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a[<br>&#8220;\u706b\u5f71\uff0c\u662f\u6ca1\u6709\u6377\u5f84\u53ef\u8d70\u7684\u3002&#8221;,<br>&#8220;\u8bf4\u9053\u505a\u5230\uff0c\u8fd9\u5c31\u662f\u6211\u7684\u5fcd\u9053\uff01&#8221;<br>]<\/p>\n\n\n\n<p>\u8fd9\u662f\u4e00\u4e2ajson\u6570\u7ec4\uff0c\u7531\u591a\u4e2a\u5b57\u7b26\u4e32\u7ec4\u6210\uff0c\u4e2d\u95f4\u7528\u9017\u53f7\u5206\u5f00\uff0c\u6ce8\u610f\u6700\u540e\u4e00\u4e2a\u53e5\u5b50\u540e\u9762\u4e0d\u52a0\u9017\u53f7\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4fee\u6539pug\u6587\u4ef6<\/h2>\n\n\n\n<p>\u627e\u5230<code>[Blog_Root]\\themes\\butterfly\\layout\\includes\\third-party\\subtitle.pug<\/code>\uff0c\u4fee\u6539\u5176\u4e2d\u7684\u5185\u5bb9\uff1a+- let Eamonsubtitle = &#8220;\u5475\u5475\u5475&#8221;<br>default<br>&nbsp; &#8211; subContent = subContent.length ? subContent : new Array(config.subtitle)<br>&nbsp; script.<br>&nbsp; &nbsp; function subtitleType () {<br>&nbsp; &nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; &nbsp; window.typed = new Typed(&#8220;#subtitle&#8221;, {<br>&#8211; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings: !{JSON.stringify(subContent)},<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings: [Eamonsubtitle],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startDelay: 300,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeSpeed: 150,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loop: !{loop},<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; backSpeed: 50<br>&nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8220;subtitle&#8221;).innerHTML = &#8216;!{subContent[0]}&#8217;<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>\u200b<br>&#8211; &nbsp; &nbsp; if (!{effect}) {<br>&#8211; &nbsp; &nbsp; &nbsp; if (typeof Typed === &#8216;function&#8217;) {<br>&#8211; &nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>&#8211; &nbsp; &nbsp; &nbsp; } else {<br>&#8211; &nbsp; &nbsp; &nbsp; &nbsp; getScript(&#8216;!{url_for(theme.asset.typed)}&#8217;).then(subtitleType)<br>&#8211; &nbsp; &nbsp; &nbsp; }<br>&#8211; &nbsp; &nbsp; } else {<br>&#8211; &nbsp; &nbsp; &nbsp; subtitleType()<br>&#8211; &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; function loaddoc(){<br>+ &nbsp; &nbsp; &nbsp; var xhttp = new XMLHttpRequest();<br>+ &nbsp; &nbsp; &nbsp; xhttp.onreadystatechange = function(){<br>+ &nbsp; &nbsp; &nbsp; var jsona = [&#8220;\u54c8\u54c8\u54c8&#8221;,&#8221;\u563f\u563f\u563f&#8221;];<br>+ &nbsp; &nbsp; &nbsp; var jslength = 0;<br>+ &nbsp; &nbsp; &nbsp; &nbsp; if(this.readyState == 4 &amp;&amp; this.status == 200) {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jsona = JSON.parse(this.responseText);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jslength = 0;<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(var x in jsona){<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jslength++;<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!{effect}) {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (typeof Typed === &#8216;function&#8217;) {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getScript(&#8216;!{url_for(theme.asset.typed)}&#8217;).then(subtitleType)<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var random_no = Math.floor(Math.random()*100000%jslength);<br>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eamonsubtitle = jsona[random_no];<br>+ &nbsp; &nbsp; &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; &nbsp; xhttp.open(&#8220;GET&#8221;, &#8220;\/subtitle.json&#8221;, true);<br>+ &nbsp; &nbsp; &nbsp; xhttp.send();<br>+ &nbsp; &nbsp; }<br>+ &nbsp; &nbsp; loaddoc();<\/p>\n\n\n\n<p>\u7b2c\u4e00\u884c\u90a3\u53e5let\u9876\u683c\u5199\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u6ca1\u6709\u5bf9\u8fd9\u4e2a\u6587\u4ef6\u6709\u8fc7\u4efb\u4f55\u4fee\u6539\uff0c\u53ef\u4ee5\u628a\u4e0b\u9762\u7684\u76f4\u63a5\u9644\u8fd1\u8fdb\u53bb\u66ff\u6362\u6389\u539f\u6587\uff08\u6211\u7528\u7684Butterfly\u7248\u672c\u662f4.3.1\uff09\uff1a- const { effect,loop,source,sub } = theme.subtitle<br>&#8211; let subContent = sub || new Array()<br>&#8211; let Eamonsubtitle = &#8220;\u5475\u5475\u5475&#8221;<br>case source<br>when 1<br>&nbsp; script.<br>&nbsp; &nbsp; function subtitleType () {<br>&nbsp; &nbsp; &nbsp; fetch(&#8216;https:\/\/v1.hitokoto.cn&#8217;)<br>&nbsp; &nbsp; &nbsp; &nbsp; .then(response =&gt; response.json())<br>&nbsp; &nbsp; &nbsp; &nbsp; .then(data =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const from = &#8216;\u51fa\u81ea &#8216; + data.from<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const sub = !{JSON.stringify(subContent)}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sub.unshift(data.hitokoto, from)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.typed = new Typed(&#8216;#subtitle&#8217;, {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings: sub,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startDelay: 300,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeSpeed: 150,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loop: !{loop},<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; backSpeed: 50,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;subtitle&#8217;).innerHTML = data.hitokoto<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; }<br>\u200b<br>&nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; if (typeof Typed === &#8216;function&#8217;) {<br>&nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; getScript(&#8216;!{url_for(theme.asset.typed)}&#8217;).then(subtitleType)<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; }<br>\u200b<br>when 2<br>&nbsp; script.<br>&nbsp; &nbsp; function subtitleType () {<br>&nbsp; &nbsp; &nbsp; getScript(&#8216;https:\/\/yijuzhan.com\/api\/word.php?m=js&#8217;).then(() =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; const con = str[0]<br>&nbsp; &nbsp; &nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const from = &#8216;\u51fa\u81ea &#8216; + str[1]<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const sub = !{JSON.stringify(subContent)}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sub.unshift(con, from)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.typed = new Typed(&#8216;#subtitle&#8217;, {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings: sub,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startDelay: 300,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeSpeed: 150,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loop: !{loop},<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; backSpeed: 50,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;subtitle&#8217;).innerHTML = con<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; }<br>\u200b<br>&nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; if (typeof Typed === &#8216;function&#8217;) {<br>&nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; getScript(&#8216;!{url_for(theme.asset.typed)}&#8217;).then(subtitleType)<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; }<br>\u200b<br>when 3<br>&nbsp; script.<br>&nbsp; &nbsp; function subtitleType () {<br>&nbsp; &nbsp; &nbsp; getScript(&#8216;https:\/\/sdk.jinrishici.com\/v2\/browser\/jinrishici.js&#8217;).then(() =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; jinrishici.load(result =&gt;{<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const sub = !{JSON.stringify(subContent)}<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const content = result.data.content<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sub.unshift(content)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.typed = new Typed(&#8216;#subtitle&#8217;, {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings: sub,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startDelay: 300,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeSpeed: 150,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loop: !{loop},<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; backSpeed: 50,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8216;subtitle&#8217;).innerHTML = result.data.content<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; }<br>\u200b<br>&nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; if (typeof Typed === &#8216;function&#8217;) {<br>&nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; getScript(&#8216;!{url_for(theme.asset.typed)}&#8217;).then(subtitleType)<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; }<br>\u200b<br>default<br>&nbsp; &#8211; subContent = subContent.length ? subContent : new Array(config.subtitle)<br>&nbsp; script.<br>&nbsp; &nbsp; function subtitleType () {<br>&nbsp; &nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; &nbsp; window.typed = new Typed(&#8220;#subtitle&#8221;, {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strings: [Eamonsubtitle],<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; startDelay: 300,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; typeSpeed: 150,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loop: !{loop},<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; backSpeed: 50<br>&nbsp; &nbsp; &nbsp; &nbsp; })<br>&nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; document.getElementById(&#8220;subtitle&#8221;).innerHTML = &#8216;!{subContent[0]}&#8217;<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; function loaddoc(){<br>&nbsp; &nbsp; &nbsp; var xhttp = new XMLHttpRequest();<br>&nbsp; &nbsp; &nbsp; xhttp.onreadystatechange = function(){<br>&nbsp; &nbsp; &nbsp; var jsona = [&#8220;\u54c8\u54c8\u54c8&#8221;,&#8221;\u563f\u563f\u563f&#8221;];<br>&nbsp; &nbsp; &nbsp; var jslength = 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; if(this.readyState == 4 &amp;&amp; this.status == 200) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jsona = JSON.parse(this.responseText);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jslength = 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(var x in jsona){<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jslength++;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!{effect}) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (typeof Typed === &#8216;function&#8217;) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getScript(&#8216;!{url_for(theme.asset.typed)}&#8217;).then(subtitleType)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; subtitleType()<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var random_no = Math.floor(Math.random()*100000%jslength);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Eamonsubtitle = jsona[random_no];<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; xhttp.open(&#8220;GET&#8221;, &#8220;\/subtitle.json&#8221;, true);<br>&nbsp; &nbsp; &nbsp; xhttp.send();<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; loaddoc();<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6e\u4e3b\u9898\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<p># the subtitle on homepage (\u4e3b\u9801subtitle)<br>subtitle:<br>enable: true<br>&nbsp;# Typewriter Effect (\u6253\u5b57\u6548\u679c)<br>effect: true<br>&nbsp;# loop (\u5faa\u74b0\u6253\u5b57)<br>loop: false<br>&nbsp;# source \u8abf\u7528\u7b2c\u4e09\u65b9\u670d\u52d9<br>&nbsp;# source: false \u95dc\u9589\u8abf\u7528<br>&nbsp;# source: 1 \u8abf\u7528\u4e00\u8a00\u7db2\u7684\u4e00\u53e5\u8a71\uff08\u7c21\u9ad4\uff09 https:\/\/hitokoto.cn\/<br>&nbsp;# source: 2 \u8abf\u7528\u4e00\u53e5\u7db2\uff08\u7c21\u9ad4\uff09 http:\/\/yijuzhan.com\/<br>&nbsp;# source: 3 \u8abf\u7528\u4eca\u65e5\u8a69\u8a5e\uff08\u7c21\u9ad4\uff09 https:\/\/www.jinrishici.com\/<br>&nbsp;# subtitle \u6703\u5148\u986f\u793a source , \u518d\u986f\u793a sub \u7684\u5167\u5bb9<br>source: false<br>&nbsp;# \u5982\u679c\u95dc\u9589\u6253\u5b57\u6548\u679c\uff0csubtitle \u53ea\u6703\u986f\u793a sub \u7684\u7b2c\u4e00\u884c\u6587\u5b57<br>sub:<br>&#8211; \u751f\u6d3b\u561b\uff0c\u90a3\u4e48\u77eb\u60c5~<\/p>\n\n\n\n<p><code>enable<\/code>\u8bbe\u7f6e\u4e3a<code>true<\/code>\uff0c<code>effect<\/code>\u8bbe\u7f6e\u4e3a<code>true<\/code>\uff0c<code>source<\/code>\u8bbe\u7f6e\u4e3afalse\uff0c<code>sub<\/code>\u968f\u4fbf\u5199\u4e00\u53e5\uff0c\u4e0d\u77e5\u9053\u4e0d\u5199\u884c\u4e0d\u884c\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u5c31\u53ef\u4ee5\u90e8\u7f72\u8bd5\u8bd5\u5566\uff0c\u6548\u679c\u70b9\u672c\u535a\u5ba2\u5de6\u4e0a\u89d2\u6807\u9898\u56de\u5230\u9996\u9875\u5c31\u80fd\u770b\u5230\u3002\u6211\u5bf9\u8fd9\u4e9b\u4ee3\u7801\u4e5f\u662f\u73b0\u5b66\u73b0\u5356\u7684\uff0c\u800c\u4e14\u672c\u8eab\u662f\u66b4\u529b\u5d4c\u5165\u5f0f\u4fee\u6539\u5f88\u4e0d\u4f18\u96c5\uff0c\u4e0d\u8fc7\u5b83\u786e\u5b9ework\u4e86\u3002\u5e0c\u671b\u6709\u66f4\u4f18\u96c5\u7684\u65b9\u6848\u51fa\u6765\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u4eba\u5acc\u5f03Butterfly\u4e3b\u9898\u81ea\u5e26\u7684\u968f\u673a\u53e5\u5b50\u4e0d\u591f\u4e2d\u4e8c\uff0c\u975e\u8981\u81ea\u5df1\u52a8\u624b\u6539wwww\u3002\u8fd9\u7bc7\u6559\u7a0b\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u521b\u5efa\u81ea\u5b9a\u4e49\u53e5\u5b50\u5e93\uff0c\u5e76\u4fee\u6539Pug\u6587\u4ef6\uff0c\u8ba9\u9996\u9875\u526f\u6807\u9898\u80fd\u968f\u673a\u5c55\u793a\u4f60\u73cd\u85cf\u7684\u201c\u5fcd\u9053\u201d\u6216\u4efb\u4f55\u559c\u6b22\u7684\u53f0\u8bcd\u54e6\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts\/128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=128"}],"version-history":[{"count":2,"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":14186,"href":"https:\/\/fanyiming.life\/index.php?rest_route=\/wp\/v2\/posts\/128\/revisions\/14186"}],"wp:attachment":[{"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fanyiming.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}