mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-14 04:06:45 +09:00
Hardcode filter-categories and filter-post-types
This commit is contained in:
+9
-2
@@ -1,7 +1,6 @@
|
||||
import fs from 'fs';
|
||||
import xml2js from 'xml2js';
|
||||
import * as frontmatter from './frontmatter.js';
|
||||
import * as settings from './settings.js';
|
||||
import * as shared from './shared.js';
|
||||
import * as translator from './translator.js';
|
||||
|
||||
@@ -35,7 +34,15 @@ function getPostTypes(channelData) {
|
||||
// search export file for all post types minus some specific types we don't want
|
||||
const types = channelData
|
||||
.map(item => item.post_type[0])
|
||||
.filter(type => !settings.filter_post_types.includes(type));
|
||||
.filter(type => ![
|
||||
'attachment',
|
||||
'revision',
|
||||
'nav_menu_item',
|
||||
'custom_css',
|
||||
'customize_changeset',
|
||||
'wp_global_styles',
|
||||
'wp_navigation'
|
||||
].includes(type));
|
||||
return [...new Set(types)]; // remove duplicates
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user