New setting for post types

This commit is contained in:
Will Boyd
2020-12-26 13:18:49 -05:00
parent 0f69e8cf46
commit 2e9550f14a
3 changed files with 41 additions and 20 deletions
+5
View File
@@ -132,6 +132,11 @@ function getPostPath(post, config) {
// start with base output dir
const pathSegments = [config.output];
// create fragment for post type, if there's more than one
if (settings.post_types.length > 1) {
pathSegments.push(post.meta.type);
}
if (config.yearFolders) {
pathSegments.push(dt.toFormat('yyyy'));
}