Skip to content

Commit

Permalink
Resolve hexojs#1490
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofzerbe committed Sep 21, 2021
1 parent 0c979bf commit e6fa087
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/plugins/processor/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,14 @@ module.exports = ctx => {

if (!result || isHiddenFile(result.path)) return;

//checks only if there is a renderer for the file type or if is included in skip_render
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));
}

return result;
}),

Expand Down

0 comments on commit e6fa087

Please sign in to comment.