<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Hexo 入門指南(七) - 評論 & 分享 ## 評論 ## hexo默認集成了disqus,但是在天朝明顯多說更受歡迎一點。 首先到多說官網去注冊一個賬號。然后點擊進入添加站點頁面,填寫所有信息。注意,多說域名的前綴就是站點的短網址,下面要用到,這里假設為short_name。 在_config.yml中添加多說的配置: ``` duoshuo_shortname: short_name ``` 修改themes\<theme_name>\layout\_partial\article.ejs,把第38行到41行的如下代碼: ``` <% if (!index && post.comments && config.disqus_shortname){ %> <section id="comments"> <div id="disqus_thread"> <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> </section> <% } %> ``` 替換成: ``` <% if (!index && post.comments && config.duoshuo_shortname){ %> <section id="comments"> <!-- 多說評論框 start --> <div class="ds-thread" data-thread-key="<%= post.layout %>-<%= post.slug %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div> <!-- 多說評論框 end --> <!-- 多說公共JS代碼 start (一個網頁只需插入一次) --> <script type="text/javascript"> var duoshuoQuery = {short_name:'<%= config.duoshuo_shortname %>'}; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async = true; ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; ds.charset = 'UTF-8'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds); })(); </script> <!-- 多說公共JS代碼 end --> </section> <% } %> ``` 之后,找到第27到29行: ``` <% if (post.comments && config.disqus_shortname){ %> <a href="<%- post.permalink %>#disqus_thread" class="article-comment-link">Comments</a> <% } %> ``` 替換成: ``` <% if (post.comments && config.duoshuo_shortname){ %> <a href="<%- url_for(post.path) %>#comments" class="article-comment-link">留言</a> <% } %> ``` ## 分享 ## hexo默認提供的那四個在國內也被墻了。這里替換成百度一鍵分享。 找到themes\landscape\layout\_partialarticle.ejs26行: ``` <a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link">分享</a> ``` 替換成: ``` <a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link bdsharebuttonbox" data-cmd="more">分享</a> <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script> ``` 之后打開themes\landscape\source\js\script.js,35~86行全部注釋掉。 ## 后記 ## 僅以此教程,悼念Aaron Swartz,RSS和Markdown的聯合創始人。沒有他,開源博客界就不會有今天。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看