Improves plugin directory path handling dynamically

Updates file path resolution to use plugin manifest directory dynamically

Replaces hardcoded plugin directory paths with more flexible approach
- Uses `this.manifest.dir!` to determine plugin directory
- Supports better cross-platform and installation compatibility
- Removes static path references in multiple plugin components

Enhances plugin robustness by making directory paths more configurable
This commit is contained in:
AlexKucera committed 2025-09-05 17:56:56 +02:00
1 parent 3cff3ff70a
commit 5519c98957
4 files changed
+22 -17

No files matched your search

+2 -1
View File
@@ -16,7 +16,8 @@ export class TemplateManager {
// Templates are stored in the plugin directory
this.templatesPath = path.join(
(this.plugin.app.vault.adapter as any).basePath,
'.obsidian/plugins/typst-pdf-export/templates'
this.plugin.manifest.dir!,
'templates'
);
}