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
|
// 复制资源文件到 docs/assets
|
||||||
for (const assetPath of assetsToCopy) {
|
for (const assetPath of assetsToCopy) {
|
||||||
try {
|
try {
|
||||||
@@ -278,11 +281,6 @@ export default class VitePressExporterPlugin extends Plugin {
|
|||||||
): Promise<Uint8Array | null> {
|
): Promise<Uint8Array | null> {
|
||||||
|
|
||||||
const activeLeaf = this.app.workspace.getLeaf();
|
const activeLeaf = this.app.workspace.getLeaf();
|
||||||
if (!activeLeaf) {
|
|
||||||
console.log('❌ No active leaf found');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
await activeLeaf.openFile(canvasFile);
|
await activeLeaf.openFile(canvasFile);
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export interface VitePressExporterSettings {
|
|||||||
|
|
||||||
export const DEFAULT_SETTINGS: VitePressExporterSettings = {
|
export const DEFAULT_SETTINGS: VitePressExporterSettings = {
|
||||||
docsPath: 'docs',
|
docsPath: 'docs',
|
||||||
assetsPath: 'docs/assets'
|
assetsPath: 'docs/public'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置面板
|
// 设置面板
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"ignoreDeprecations": "6.0",
|
||||||
"baseUrl": "src",
|
"baseUrl": "src",
|
||||||
"inlineSourceMap": true,
|
"inlineSourceMap": true,
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user