feat: Update asset paths and improve file handling in VitePress exporter
This commit is contained in:
@@ -186,6 +186,9 @@ export default class VitePressExporterPlugin extends Plugin {
|
||||
}
|
||||
}
|
||||
|
||||
const activeLeaf = this.app.workspace.getLeaf();
|
||||
await activeLeaf.openFile(sourceFile);
|
||||
|
||||
// 复制资源文件到 docs/assets
|
||||
for (const assetPath of assetsToCopy) {
|
||||
try {
|
||||
@@ -278,11 +281,6 @@ export default class VitePressExporterPlugin extends Plugin {
|
||||
): Promise<Uint8Array | null> {
|
||||
|
||||
const activeLeaf = this.app.workspace.getLeaf();
|
||||
if (!activeLeaf) {
|
||||
console.log('❌ No active leaf found');
|
||||
return null;
|
||||
}
|
||||
|
||||
await activeLeaf.openFile(canvasFile);
|
||||
|
||||
//@ts-ignore
|
||||
|
||||
@@ -8,7 +8,7 @@ export interface VitePressExporterSettings {
|
||||
|
||||
export const DEFAULT_SETTINGS: VitePressExporterSettings = {
|
||||
docsPath: 'docs',
|
||||
assetsPath: 'docs/assets'
|
||||
assetsPath: 'docs/public'
|
||||
}
|
||||
|
||||
// 设置面板
|
||||
|
||||
Reference in New Issue
Block a user