feat: Update asset paths and improve file handling in VitePress exporter
Some checks failed
Node.js build / build (20.x) (push) Failing after 5h20m6s
Node.js build / build (22.x) (push) Has been cancelled

This commit is contained in:
2026-04-21 13:02:10 +08:00
parent 3cf2cb9339
commit 113c3b668f
3 changed files with 5 additions and 6 deletions

View File

@@ -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

View File

@@ -8,7 +8,7 @@ export interface VitePressExporterSettings {
export const DEFAULT_SETTINGS: VitePressExporterSettings = {
docsPath: 'docs',
assetsPath: 'docs/assets'
assetsPath: 'docs/public'
}
// 设置面板

View File

@@ -1,5 +1,6 @@
{
"compilerOptions": {
"ignoreDeprecations": "6.0",
"baseUrl": "src",
"inlineSourceMap": true,
"inlineSources": true,