Separate normalizers out, fix config flag checks

This commit is contained in:
Will Boyd
2025-01-25 16:23:45 -05:00
parent 6a6e5074f0
commit 8841c607e7
4 changed files with 46 additions and 47 deletions
+2 -2
View File
@@ -182,11 +182,11 @@ function getPostPath(post, config) {
// start with base output dir and post type
const pathSegments = [settings.output_directory, post.meta.type];
if (config.yearFolders) {
if (config.dateFolders === 'year' || config.dateFolders === 'year-month') {
pathSegments.push(dt.toFormat('yyyy'));
}
if (config.monthFolders) {
if (config.dateFolders === 'year-month') {
pathSegments.push(dt.toFormat('LL'));
}