mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-18 06:03:45 +09:00
Separate normalizers out, fix config flag checks
This commit is contained in:
+2
-2
@@ -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'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user