<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ### 參考 * [hexo官方文檔](https://hexo.io/zh-cn/docs/) * [博客](http://baixin.io/2015/08/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/) ### 環境裝備 1. nodejs(最后大于6.0); 2. `hexo`,通過`npm install hexo -g`安裝; 3. github倉庫(username.github.io) <!-- more --> ### 常用命令 * `hexo init`創建文件夾; * `hexo clean`清除文件; * `hexo g/hexo generate`生成靜態文件; * `hexo d/hexo deploy`遠程發布 ; * `hexo server`啟動本地服務 ### hexo與github倉庫的關聯提交 在博客根目錄下的`_config.yml`的文件中,修改如下代碼: ``` deploy: type: git repo: https://github.com/MillZhang/millzhang.github.io.git #遠程git倉庫 branch: master ``` ### 主題Themes ``` git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia ``` 該主題需安裝插件,生成所有文章的目錄 ```js //僅支持node>6.0 npm i hexo-generator-json-content --save ``` 安裝完成后需要在根目錄下的`_config.yml`中添加如下的配置: ``` # 所有文章目錄 jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true ``` ### 一些小技巧 * 讓文章只顯示一部分,只需要在文章中添加`<!--more-->`,`<!--more-->`后面的內容就不顯示了; * 給文章分類(tags),需要在穩重添加`tags:[node,javascript]` ### 插件 1.使用git同步到git倉庫 ``` npm install hexo-deployer-git --save ``` 2.生成易于搜索引擎搜素的網站地圖 ``` npm install hexo-generator-sitemap --save ``` 3.生成rss訂閱文件 ``` npm install hexo-generator-feed --save ``` ### hexo免密提交 1.輸入指令,進入.ssh文件夾 ``` cd ~/.ssh/ ``` 如無文件夾,可手動創建`.ssh`文件夾 2.配置全局的name和email,這里是的你github或者bitbucket的name和email ``` git config --global user.name "millzhang" git config --global user.email "876753183@qq.com" ``` 3.生成key ``` ssh-keygen -t rsa -C "876753183@qq.com" ``` 連續按三次回車,這里設置的密碼就為空了,并且創建了key。 4.拷貝`id_rsa.pub`文件中的`key`,在`millzhang.github.io`的`Settings`中找到`Deploy Key`粘貼. 5.在博客根目錄下的`_config.yml`中修改 ``` deploy: type: git repo: git@github.com:MillZhang/millzhang.github.io.git #修改 branch: master ``` 6.使用`hexo d`就可以免密提交啦! ### 個人域名的綁定 1.在騰訊云申請域名`zy1991.cn`,進行實名認證. 2.在騰訊云進行域名解析,如下圖操作: ![操作示意圖](http://oritfw5nq.bkt.clouddn.com/QQ%E6%88%AA%E5%9B%BE20170615141211.png) 3.進入博客根目錄下的`source`文件夾,新建`CNAME`,`CNAME`中輸入域名`zy1991.cn`; 4.`hexo clean & hexo g & hexo d`即可訪問自定義域名`zy1991.cn`下的博客啦; [注]: [檢測工具](https://www.qcloud.com/product/tools?from=cns) 可查看域名的解析狀態 ### 網易云跟帖 這部分比較簡答,注冊網易云跟帖賬號,按步驟綁定項目,直接拷貝代碼至主題下的`post.ejs` ```html <div class="comment"> <div id="cloud-tie-wrapper" class="cloud-tie-wrapper"></div> </div> ``` ```js <!-- 網易云跟帖--> <script src="https://img1.cache.netease.com/f2e/tie/yun/sdk/loader.js"></script> <script> var cloudTieConfig = { url: document.location.href, sourceId: "", productKey: "40a8ee22b6084862a8907e6902e525fa", target: "cloud-tie-wrapper" }; var yunManualLoad = true; Tie.loader("aHR0cHM6Ly9hcGkuZ2VudGllLjE2My5jb20vcGMvbGl2ZXNjcmlwdC5odG1s", true); </script> ``` ### 網易云音樂 這部分做了些自定義,目的是想讓每篇文章可控制不同的音樂,并可限制是否自動播放,功能比較簡單,直接上代碼,同樣是在`post.ejs`中: ``` <!-- 網易云音樂--> <% var musicId=page.music ? page.music : config.defaultMusic, isAuto = page.musicAuto ? page.musicAuto : config.defaultMusicAuto; if(musicId == undefined){ musicId = 586299}; var musicLink = '//music.163.com/outchain/player?type=2&id='+musicId+'&auto='+Number(isAuto)+'&height=66'; %> <iframe class="cloud-music" frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="<%= musicLink %>"> </iframe> ``` 在`_config.yml`中添加了如下的配置: ``` defaultMusic: 586299 //網易云音樂外鏈播放id defaultMusicAuto: false //默認不開啟自動播放 ``` <p class="over">Over!</p>
                  <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>

                              哎呀哎呀视频在线观看