This is the source structure:
$ tree source/_posts/
source/_posts/
|-- hello-world.md
|-- test-post
| |-- test_css.css
| `-- test_js.js
`-- test-post.md
but when I executed hexo generate, the post in public folder looks like this:
$ tree public/2015/09/08/test-post/
public/2015/09/08/test-post/
|-- index.html
|-- test_css
| `-- index.html
|-- test_css.css
|-- test_js
| `-- index.html
`-- test_js.js
It seems the css files and javascript files also were rendered.
Confirmed this is happening. I'm using hexo version 3.1.1 .
This creation of additional index.html files and rendering them as if they were posts is occurring with css and js files in the asset folder, but not with jpg files.
I am suffering from this too with v3.1.1 also with v3.2.0-beta.2.
試試這配置:
skip_render:
- _posts/test-post/*
skip_render 的path 是相對source/
我就是这么输的
skip_render:
- _posts/test-post/*
貌似只要是_posts中的 js、css文件就不能skip掉
这里即使第一个判断 renderable 为 false, 只要设了 post_asset_folder 就会处理这个文件
try this:
skip_render:
- _posts/test-post/*
- _posts/test-post/*.js
- _posts/test-post/*.css
配置成这样是可以的
skip_render:
- _posts/**/*.js
- _posts/**/*.css
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 post_asset_folder flag should make renderer ignore the "asset_folder" completely, allowing only "asset" reference. Isn't this a core functionality?
This issue is still present in 3.7.1
Any progress?
Most helpful comment
Any progress? I think
post_asset_folderflag should make renderer ignore the "asset_folder" completely, allowing only "asset" reference. Isn't this a core functionality?This issue is still present in 3.7.1