You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a public JavaScript asset in source, e.g: source/demo/test.js with the following content:
var elem = '<output/>'
If you access the resource in hexo (e.g. http://localhost:4000/demo/test.js) this is the code you will find:
var elem = '<output/>'
</output>
Which is clearly wrong. .js files should never be rendered as pages (and thus mangled on HTML tags). After inspecting Hexo's code I have found there is a skip_render setting to tell Hexo what files should not be rendered but it is empty by default.
As a workaround I have added the following to my _config.yml:
skip_render:
- '**/*.js'
The text was updated successfully, but these errors were encountered:
Create a public JavaScript asset in
source
, e.g:source/demo/test.js
with the following content:If you access the resource in hexo (e.g.
http://localhost:4000/demo/test.js
) this is the code you will find:Which is clearly wrong.
.js
files should never be rendered as pages (and thus mangled on HTML tags). After inspecting Hexo's code I have found there is askip_render
setting to tell Hexo what files should not be rendered but it is empty by default.As a workaround I have added the following to my
_config.yml
:The text was updated successfully, but these errors were encountered: