31 Commits

Author SHA1 Message Date
c4e47fe9fa
安全加固:升级依赖消除高危漏洞,修复构建兼容性问题
【主项目依赖升级】
- hexo 6.x → 8.1.2:移除 swig-templates、swig-extras、旧版 cheerio、
  hexo-fs/hexo-util 等大量漏洞依赖链,解决 critical/high 级别漏洞
- hexo-renderer-marked 5.x → 7.0.1:修复 dompurify XSS 漏洞(GHSA-hpcv)
- gulp 4.x → 5.0.1:修复 vinyl-fs、glob/glob-stream、chokidar、
  braces 等 high 级漏洞链
- hexo-generator-sitemap 2.2.0 → 3.0.1:同步升级

【替换高危依赖】
- gulp-htmlmin 替换为 gulp-html-minifier-terser@7.1.0:
  gulp-htmlmin 依赖的 html-minifier 存在 ReDoS 高危漏洞且无修复版本,
  改用其维护分支 html-minifier-terser,API 完全兼容
- optimist 替换为 minimist@1.2.8(devDependency):
  optimist 捆绑的 minimist@<=0.2.3 存在 prototype pollution critical 漏洞,
  直接使用修复版 minimist 替代

【移除无修复版本的高危包】
- 移除 hexo-generator-baidu-sitemap(无维护更新,内部捆绑 hexo@4.x
  导致一系列 critical 漏洞),在 scripts/generator.js 中实现等效的
  自定义 Baidu Sitemap 生成器替代,功能与原包完全一致

【npm overrides 修复传递依赖漏洞】
- 添加 overrides: { ejs: "^6.0.1" }:
  hexo-renderer-ejs@2.x 依赖 ejs@3.x,ejs@3.x 存在 SSTI critical 漏洞
  且引入 jake → filelist → minimatch → brace-expansion 漏洞链;
  ejs@6.x 已无 jake 依赖,critical 漏洞全部消除

【yilia 主题依赖升级】
- @babel/core 7.26.x → 7.29.7:修复 Arbitrary File Read 漏洞
- @babel/plugin-transform-runtime / @babel/preset-env 同步升级至 7.29.x
- postcss 8.5.3 → 8.5.25:修复 XSS 及路径遍历漏洞
- 移除 clean-webpack-plugin(依赖链含 brace-expansion 高危漏洞),
  改用 webpack 5 内置 output.clean 实现等效的增量清理功能
- 添加 overrides: { brace-expansion: "5.0.9" } 修复剩余传递依赖漏洞

【构建兼容性修复】
- scripts/generator.js 新增 jsfiddle tag 注册:
  hexo@8 移除了内置 {% jsfiddle %} tag 导致构建 FATAL,
  重新实现该 tag 保持原有 iframe 嵌入行为
- gulpfile.js generate 任务错误处理修正:
  原代码在 hexo FATAL 时调用 hexo.exit(err) 但不向 gulp 抛出异常,
  导致 series 继续执行后续任务(compressHtml 因 public/ 不存在而报错),
  修改为在 hexo 退出后重新 throw err 确保 gulp 正确感知失败

【修复结果】
- 主项目:56 个漏洞(8 低危、14 中危、25 高危、9 严重)→ 0 个漏洞
- yilia 主题:8 个漏洞 → 1 个低危
  (剩余 1 个为 vue@2.x ReDoS,仅影响构建时自身模板解析,
  修复需整体迁移到 Vue 3 重写主题,暂不处理)
2026-07-31 20:38:04 +08:00
a2d1b2cc49
Revert "升级 Vue 2 到 Vue 3"
This reverts commit fb1cbbada498ec1493ee2502074785b6f8f58207.
2026-03-24 23:06:58 +08:00
fb1cbbada4
升级 Vue 2 到 Vue 3
- 升级 vue 2.7.16 → 3.5.14
- 重构 slider.js:new Vue() 迁移到 createApp()
- data 改为函数形式,移除 filters 改用 methods
- 更新模板 tools.ejs:过滤器语法改为方法调用
- 代码风格优化:箭头函数、const/let、简化数组操作

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 22:46:48 +08:00
6f6fcebd18
移除 axios,改用原生 fetch 实现 HTTP 请求
- 从 package.json 移除 axios 依赖
- 重构 request.js:用原生 fetch API 替代 axios
- 实现参数序列化、超时控制(AbortController)、统一响应处理
- 保持 http.get/http.post API 兼容,减少 bundle 体积

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 22:18:57 +08:00
7d827d5db8
升级 yilia 主题构建工具链
- 升级 babel 相关依赖至 ^7.26.0,配置按需引入 core-js polyfill
- 升级 webpack 5.70.0 → 5.97.1,webpack-cli 4.9.2 → 5.1.4
- 升级 css-loader、postcss-loader、less-loader 等至最新版本
- 移除废弃的 file-loader/url-loader,改用 webpack5 内置 asset modules
- 移除 babel-polyfill 和 leancloud-storage,添加 @babel/runtime 和 core-js
- 升级 vue 2.6.14 → 2.7.16,axios 1.13.6 → 1.8.4
- 添加 browserslist 配置

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 22:12:52 +08:00
c1cbb45b34
scss替换为less 2026-03-21 15:59:59 +08:00
4578670432
升级axios 2026-03-21 14:47:37 +08:00
dependabot[bot]
b46ea82104
Bump json5 and babel-loader in /themes/yilia
Bumps [json5](https://github.com/json5/json5) to 2.2.3 and updates ancestor dependency [babel-loader](https://github.com/babel/babel-loader). These dependencies need to be updated together.


Updates `json5` from 2.2.0 to 2.2.3
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3)

Updates `babel-loader` from 8.2.3 to 8.3.0
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.3...v8.3.0)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
- dependency-name: babel-loader
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 14:47:36 +00:00
05a3b66599 node-sass换为dart-sass 2022-03-13 00:35:25 +08:00
30904edfa1 webpack 打包配置修改 2022-03-07 16:11:31 +08:00
913f9f6c62 主题webpack升级到5 2022-03-07 15:17:11 +08:00
036268bb71
Merge pull request #12 from sookie2010/dependabot/npm_and_yarn/themes/yilia/node-sass-4.13.1
Bump node-sass from 4.12.0 to 4.13.1 in /themes/yilia
2021-04-20 09:49:56 +08:00
dependabot[bot]
c969c343a7
Bump axios from 0.19.0 to 0.21.1 in /themes/yilia
Bumps [axios](https://github.com/axios/axios) from 0.19.0 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 07:29:10 +00:00
dependabot[bot]
df8fd44f72
Bump node-sass from 4.12.0 to 4.13.1 in /themes/yilia
Bumps [node-sass](https://github.com/sass/node-sass) from 4.12.0 to 4.13.1.
- [Release notes](https://github.com/sass/node-sass/releases)
- [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/node-sass/compare/v4.12.0...v4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-04 09:36:18 +00:00
结发受长生
62eb074a57 首页列表添加动画效果 2019-08-24 20:52:28 +08:00
结发受长生
40d2b564a3 algolia-search你个废物,不能传全文执行检索要你何用 2019-06-28 20:23:34 +08:00
结发受长生
402ab0d495 升级clean-webpack-plugin 2019-06-28 16:55:23 +08:00
结发受长生
ffc1454d04 打包调整兼容IE 2019-05-27 10:18:18 +08:00
结发受长生
ed30d8779f 配色细节修改 2019-05-23 16:40:13 +08:00
结发受长生
a56e371bb0 修改webpack配置 2019-05-17 15:51:06 +08:00
结发受长生
4a3731db41 照片墙优化 2019-05-13 10:41:55 +08:00
结发受长生
731f80f631 修改scripts 2019-05-12 22:20:51 +08:00
结发受长生
f7b8721ec6 精简js 2019-05-09 23:10:12 +08:00
结发受长生
e1c0029234 主题包升级webpack4 2019-04-30 12:24:31 +08:00
结发受长生
469c56f570 添加看板娘 2019-04-27 17:28:41 +08:00
结发受长生
6b57563306 二维码生成 2018-07-03 13:23:15 +08:00
结发受长生
9e44b10581 换用valine评论 2018-06-28 17:16:52 +08:00
结发受长生
0b0053c07e 搜索优化 2018-06-19 11:56:37 +08:00
结发受长生
131e7fbbd7 打包调整 2018-06-09 20:46:20 +08:00
结发受长生
5abf999657 gitalk评论 2018-06-07 00:18:33 +08:00
结发受长生
c77caf259f 新主题 2018-06-06 17:33:48 +08:00