-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asset files were rendered when post_asset_folder set to true #1490
Comments
Confirmed this is happening. I'm using hexo version 3.1.1 . |
I am suffering from this too with v3.1.1 also with v3.2.0-beta.2. |
試試這配置: skip_render:
- _posts/test-post/*
|
我就是这么输的 skip_render:
- _posts/test-post/* 貌似只要是_posts中的 js、css文件就不能skip掉 我看了下代码 hexo/lib/plugins/processor/post.js Line 240 in 8f35f15
这里即使第一个判断 renderable 为 false, 只要设了 post_asset_folder 就会处理这个文件 |
try this:
|
配置成这样是可以的
|
I have the same issue. It becomes the most annoying issue for me now. I have html files in the asset folder. Hexo renders them. I try js files. Hexo renders them. skipping render doesn't work. The tag for the issue is weird. "duplicate" and "need-verify" are not suitable for this situation. |
Any progress? I think |
Any progress? |
There is a solution, or at least an alleviation of the problem. See #4781. In order to fix the problem on your own in the meanwhile, just edit ...
result.renderable = ctx.render.isRenderable(path) && !isMatch(path, ctx.config.skip_render);
//if post_asset_folder is set, restrict renderable files to default file extension
if (result.renderable && ctx.config.post_asset_folder) {
result.renderable = (extname(ctx.config.new_post_name) === extname(path));
} It helps for all files in post asset folders, but the default post file type configured in |
fix(#1490): if `post_asset_folder` is set, restrict renderable files to default file extension
This is the source structure:
but when I executed
hexo generate
, the post in public folder looks like this:It seems the css files and javascript files also were rendered.
The text was updated successfully, but these errors were encountered: