feat: add PDF embedding and frontmatter display controls

- Add embedPdfFiles setting to control PDF attachment embedding
- Add printFrontmatter setting to display frontmatter as formatted text
- Implement frontmatter formatting with proper line breaks and bullet lists
- Add settings toggles to both plugin settings and export modal
- Fix filename sanitization for PDF preview images with spaces
- Ensure modal export config includes new behavior settings
- Always generate PDF preview images regardless of embedding setting

The frontmatter display formats long comma-separated values (like email lists)
as bulleted lists and adds proper line breaks after each property label.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-09-04 22:15:08 +02:00
1 parent f742f9b1ed
commit 70241a012c
7 files changed
+342 -112

No files matched your search

+8 -2
View File
@@ -89,6 +89,10 @@ export interface obsidianTypstPDFExportSettings {
exportConcurrency: number;
/** Enable debug mode for verbose logging */
debugMode: boolean;
/** Whether to embed PDF files as attachments in the output PDF */
embedPdfFiles: boolean;
/** Display frontmatter as formatted text at the beginning of the document */
printFrontmatter: boolean;
};
}
@@ -145,6 +149,8 @@ export const DEFAULT_SETTINGS: obsidianTypstPDFExportSettings = {
openAfterExport: true,
preserveFolderStructure: true,
exportConcurrency: 3,
debugMode: false
debugMode: false,
embedPdfFiles: true,
printFrontmatter: false
}
};;
};;;;