Hexo 7.0.0 版本發佈

GitHub 發佈說明:v7.0.0

遷移指南

一些內建標籤已被移除 (gistyoutubejsfiddlevimeo)。如果您在現有的部落格文章中使用這些標籤,您可以安裝hexo-tag-embed,以便在 Hexo v7.0.0 中繼續使用它們。

如果您沒有使用(或將不會使用)文章或頁面中的 gistyoutubejsfiddlevimeo 標籤,則無需安裝。

$ npm i hexo-tag-embed

語法高亮已重構,並由以下設定控制。有關更多詳細資訊,請參閱語法高亮

syntax_highlighter: highlight.js # highlight.js | prismjs | <empty>

重大變更

  • chore: 需要 node14+,由 @yoshinorin#5061 中完成
  • 已移除標籤功能。請參閱 遷移指南 章節。
  • 已移除的功能
    • refactor: 移除 external_link 布林值類型,由 @yoshinorin#5063 中完成
    • refactor: 移除 updated_optionuse_date_for_updated 選項,由 @yoshinorin#5062 中完成
    • feat(post): 移除 front-matter 屬性 link (#5253),由 @stevenjoezhang#5253 中完成
  • revert: 從來源資料夾存取資料檔案 (#1969) (#5325),由 @stevenjoezhang#5325 中完成
  • refactor highlight: 為高亮加入擴充 API,由 @stevenjoezhang#5095 中完成

值得注意的變更

新功能

  • feat(tags/post_link): 搜尋 slug 和標題,由 @stevenjoezhang#5114 中完成
  • feat(open_graph): 移除 google_plus,由 @stevenjoezhang#5115 中完成
  • feat(tags/img): 在 img 標題和 alt 中支援引號,由 @stevenjoezhang#5112 中完成
  • feat(console-new): 支援從路徑取得預設標題,由 @xu-song#4714 中完成
  • feat: 新增選項以停用文章中的標題大小寫轉換,由 @renbaoshuo#5156 中完成
  • feat: 為 prismjs 加入 exclude_languages 功能,由 @D-Sketon#5182 中完成
  • feat(tags/post_link): 當標題為空時使用 slug,由 @stevenjoezhang#5220 中完成
  • feat: 新增 url_for 和 full_url_for 標籤外掛,由 @D-Sketon#5198 中完成
  • feat: 允許外掛或腳本中使用頂層 await,由 @Pcrab#5228 中完成
  • feat: 定義全域變數 hexo (#5242),由 @dimaslanjaka#5242 中完成

修正

  • fix(#1099): 當變更設定時,hexo 伺服器發生錯誤,由 @D-Sketon#5055 中完成
  • fix: exclude_languages 在程式碼區塊中無法運作,由 @stevenjoezhang#5088 中完成
  • 當使用 promise 化時,store 不會保留 disableNunjucks 屬性,由 @tcr#2670 中完成
  • fix(post): 在非文章上跳過 before_post_render 和 after_post_render,由 @stevenjoezhang#5118 中完成
  • fix: 無法建立標題包含特殊字元的文章,由 @D-Sketon#5149 中完成
  • fix(box): 檢查無效檔案,由 @stevenjoezhang#5173 中完成
  • fix(backtick_code): 處理空的程式碼區塊,由 @stevenjoezhang#5206 中完成
  • fix(moize): helper 函式無法與 relative_url 正常運作,由 @D-Sketon#5217 中完成
  • fix(post): skip_render 在 post_asset_folder 中無法運作 (#5258),由 @D-Sketon#5258 中完成
  • 還原 “fix(backtick_code): 處理空的程式碼區塊 (#5206)” (#5257),由 @stevenjoezhang#5257 中完成
  • fix(post-asset): 在 permalink 上更好地移除副檔名 (#5153),由 @KagamigawaMeguri#5153 中完成
    • 還原於:還原 “fix(post-asset): 在 permalink 上更好地移除副檔名 (#5153)” (#5308),由 @stevenjoezhang#5308 中完成

效能

重構

  • refactor: 使用 WHATWG URL API 取代 url.resolve,由 @yoshinorin#5136 中完成

CI/CD

  • ci: 減少 ci 的執行次數 (#5282),由 @uiolee#5282 中完成
  • ci: 減少 ci 的執行次數 (#5291),由 @uiolee#5291 中完成

依賴

  • chore: 將 sinon 從 13.0.2 更新至 14.0.0,由 @dependabot 在 #4965 中完成
  • chore: 將 lint-staged 從 11.2.6 更新至 13.0.3,由 @dependabot 在 #5008 中完成
  • chore:由 @dependabot 在 #4966 中將 husky 從 7.0.4 版本升級至 8.0.1 版本
  • chore:由 @dependabot 在 #5077 中將 hexo-fs 從 3.1.0 版本升級至 4.0.0 版本
  • chore:由 @dependabot 在 #5081 中將 hexo-renderer-marked 從 5.0.0 版本升級至 6.0.0 版本
  • chore:由 @dependabot 在 #5087 中將 hexo-front-matter 從 3.0.0 版本升級至 4.0.0 版本
  • chore:由 @dependabot 在 #5093 中將 abbrev 從 1.1.1 版本升級至 2.0.0 版本
  • chore:由 @dependabot 在 #5099 中將 hexo-i18n 從 1.0.0 版本升級至 2.0.0 版本
  • chore:由 @dependabot 在 #5107 中將 hexo-util 從 2.7.0 版本升級至 3.0.1 版本
  • chore:由 @dependabot 在 #5101 中將 warehouse 從 4.0.2 版本升級至 5.0.0 版本
  • chore(deps):由 @yoshinorin#5096 中將 hexo-log3.2.0 版本更新至 4.0.1 版本
  • chore:由 @dependabot 在 #5121 中將 sinon 從 14.0.2 版本升級至 15.0.0 版本
  • chore:由 @Pcrab#5202 中變更相依套件版本
  • chore:由 @dependabot 在 #5227 中將 c8 從 7.14.0 版本升級至 8.0.0 版本 (#5227)

測試

雜項

  • 修復錯字 (#5245),由 @stevenjoezhang#5245 中完成
  • chore(github):由 @yoshinorin#5248 中刪除 other 問題範本 (#5248)
  • chore(lint-staged):由 @uiolee#5281 中移除 git-exec-and-restage (#5281)
  • chore(github):由 @uiolee#5319 中使用 github 問題表單 (#5319)

新貢獻者

完整變更日誌

6.3.0…v7.0.0