Set Hexo Environment Link To Github 參考連結
Set Butterfly Environment version 5.2.2參考連結 參考連結
Use Search in Blog note: 用太新的 Butterfly Theme 會出錯
1 npm install hexo-generator-search --save
1 2 3 4 5 6 search: use: local_search placeholder:
參考連結
Music in Blog Netease Api Netease Music 參考連結 參考連結
Local 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 aplayerInject: enable : true per_page: true pjax: enable : true exclude: - /music/ aplayer: meting: true asset_inject: true {% aplayerlist %} { "narrow" : false , "autoplay" : true , "mode" : "random" , "showlrc" : 3, "mutex" : false , "theme" : "#e6d0b2" , "preload" : "metadata" , "listmaxheight" : "513px" , "music" : [ { "title" : "千年血戰op" , "author" : "キタニタツヤ" , "url" : "https://github.com/yuemusic0211/music/raw/refs/heads/main/%E6%AD%BB%E7%A5%9E/%E5%8D%83%E5%B9%B4%E8%A1%80%E6%88%B0op.mp3" , "pic" : "https://github.com/yuemusic0211/music/blob/main/picture/%E3%82%AD%E3%82%BF%E3%83%8B%E3%82%BF%E3%83%84%E3%83%A4.jpg?raw=true" , "lrc" : "" } ] } {% endaplayerlist %}
1 2 3 4 comments: use: - Gitalk
參考連結
custom loading page
此 butterfly 版本沒有 loading.pug, 而是變成 fullpage-loading.pug。
script 也被包在 fullpage-loading.pug。
default 的部分也要記得設定。
layout.pug 要寫成 bash 那樣。1 2 3 4 if theme.preloader.enable !=partial('includes/loading/fullpage-loading' , {}, {cache: true }) else !=partial('includes/loading/index' , {}, {cache: true })
參考連結
SEO搜索引擎优化
SEO (Search Engine Optimization),是指搜尋引擎優化。SEO 就是可以提升網站排名的所有方法的總稱,SEO 用於確保網站及其内容在搜尋引擎頁面(SERP)上的可見性。查看部落格,是否被收錄,搜尋以下site: https://yue0211.github.io/
,若未被搜尋引擎收錄,则需進行配置。
輸入以下指令:1 npm install hexo-generator-sitemap --save
進入 google 搜索控制台 ,登入部落格網址。
選擇html文件驗證
,將下載文件放在source
下。在 _config.yml 中,加入忽略編譯的文件,如下:1 2 skip_render: - googlexxxxxxx.html
然後 push 到 github,再點擊驗證,需等待一段時間才會成功。
驗證成功後可將 googlexxxxxxx.html 刪除。
點擊 google 搜索控制台,左側的 sitemap,加入路徑 : https://yue0211.github.io/sitemap.xml
,狀態會是無法擷取。
設定 _config.yml1 2 3 sitemap: path: sitemap.xml
設定 _config.butterfly.yml,設定完後網頁的 head 會多一個 meta google-site-verification1 2 3 site_verification: - name: google-site-verification content: xxxxxxxx
需等待數天才會顯示成功。參考連結 參考連結 參考連結
Detail Setting in Blog 參考連結
Hexo 常用指令 1 2 3 4 5 6 7 8 hexo clean hexo g hexo s hexo d hexo g -d hexo g -d -m "message" hexo new <post-title> hexo new page <page-title>