Enhances template handling for Typst exports.
Improves template resolution for Typst exports by adding the plugin's templates directory as a resource path. This allows Typst to correctly locate and utilize template files within the plugin. Updates the template path handling to use relative paths from the vault root, ensuring proper import behavior within Typst.
This commit is contained in:
2 files changed
+12
-7
No files matched your search
@@ -448,8 +448,8 @@ export class obsidianTypstPDFExport extends Plugin {
|
||||
* Export a file with specific configuration
|
||||
*/
|
||||
private async exportFileWithConfig(file: TFile, config: ExportConfig): Promise<void> {
|
||||
const pluginDir = this.manifest.dir!;
|
||||
const vaultPath = (this.app.vault.adapter as any).basePath;
|
||||
const pluginDir = path.join(vaultPath, this.manifest.dir!);
|
||||
|
||||
// Create controller for this export (allows cancellation)
|
||||
this.currentExportController = new AbortController();
|
||||
|
||||
Reference in new issue
Block a user