feat: author support and UI support for multi-category

This commit is contained in:
2026-02-15 16:51:29 +01:00
parent 21ed992727
commit 14be7aa7af
12 changed files with 936 additions and 7 deletions

View File

@@ -36,6 +36,8 @@ import type { WxrPost, WxrMedia } from './WxrParser';
export interface ImportExecutionOptions {
/** Path to the WordPress uploads folder for media files */
uploadsFolder?: string;
/** Default author to use when WXR post/media has no author */
defaultAuthor?: string;
/** Progress callback */
onProgress?: (phase: string, current: number, total: number, detail?: string) => void;
}
@@ -461,7 +463,7 @@ export class ImportExecutionEngine extends EventEmitter {
excerpt: wxrPost.excerpt || undefined,
content: transformedContent,
status,
author: wxrPost.creator || undefined,
author: wxrPost.creator || options.defaultAuthor || undefined,
createdAt,
updatedAt,
publishedAt,
@@ -634,6 +636,7 @@ export class ImportExecutionEngine extends EventEmitter {
title: wxrMedia.title || undefined,
alt: wxrMedia.description || undefined,
mimeType: wxrMedia.mimeType,
author: options.defaultAuthor,
tags: [],
linkedPostIds,
createdAt,