mirror of
https://github.com/PacFactory/Docs-Exporter-Astro.git
synced 2025-12-20 02:31:04 -05:00
2.0 KiB
2.0 KiB
CHANGELOG.md
General Changes
-
Code Refactoring
- Significant restructuring of the functions to improve readability and maintainability.
- Added Playwright to replace wkhtmltopdf.
- Introduction of meaningful function and variable names for better clarity.
-
Error Handling
- Enhanced error handling with
try-exceptblocks, especially for frontmatter parsing and file operations.
- Enhanced error handling with
New Features
-
HTML Preprocessing
- Added functions
preprocess_code_blocksandprocess_image_pathsto handle custom Markdown syntax and image path updates for rendering consistency.
- Added functions
-
Frontmatter Parsing
- Introduced
parse_frontmatter,preprocess_frontmatter, andrestore_html_tagsfunctions to manage YAML frontmatter in Markdown files, enhancing metadata handling.
- Introduced
-
Repository Cloning
- Added
clone_repoto handle Git repository cloning with sparse checkout support, improving integration with remote documentation sources.
- Added
-
PDF Generation
- Integrated Playwright for rendering and generating PDFs from HTML content.
- Added support for custom headers, footers, and styles in the generated PDFs.
-
Table of Contents (ToC)
- Automatically generates a ToC from parsed metadata with proper hierarchy and numbering.
Bug Fixes
-
File Sorting
- Fixed sorting issues in
get_files_sortedto prioritizeindex.mdandindex.mdxfiles.
- Fixed sorting issues in
-
Open File Check
- Added
is_file_opento ensure output files are not already open, preventing write conflicts.
- Added
-
Version Detection
- Improved
find_latest_versionlogic to detect and sort unique versions from HTML content.
- Improved
Removed Features
- Any obsolete or unused features from
export-docs.old.pywere removed to streamline the codebase.
Performance Improvements
- Optimized file processing loop to handle large repositories more efficiently.
- Improved Playwright's rendering performance by preloading images and resources.