hexo-theme-stellar icon indicating copy to clipboard operation
hexo-theme-stellar copied to clipboard

hacker-text.js:1 Uncaught SyntaxError: Unexpected token '&'

Open Cactusinhand opened this issue 1 year ago • 0 comments

检查清单

  • [X] 已经阅读过 官方文档 相关内容,并尝试进行搜索。
  • [X] 尝试过在本地测试运行官方 demo 源码。
  • [ ] 尝试过在 Codespace 中测试运行官方 demo 源码。

问题描述

source/js/下自定义的脚本,执行总是出错, 比如:link-icon.js:1 Uncaught SyntaxError: Unexpected token '&'。 看了下,执行完 hexo g 之后,source/js/里的代码 引号或双引号会被转义: image

这个怎么解决啊。 我试过在 _config.yml里面加了如下配置,来跳过渲染:

skip_render:
  - js/**/*.js
  - js/*.js

结果还是被转换了

Cactusinhand avatar Aug 31 '24 04:08 Cactusinhand