Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling additional files without extensions #270

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

igorbenic
Copy link
Collaborator

Closes #138

🚀 Changeset Summary

This changeset introduces enhancements to Simply Static’s file handling and binary file detection, specifically focusing on additional file management and custom handler assignment.

🆕 New Features:

  • Additional File Handler:
    • A new Additional_File_Handler class was introduced to manage user-specified files, allowing Simply Static to handle custom files beyond typical web pages.

🔄 Enhancements:

  • Binary File Detection:

    • The is_binary_file method in the Page model was updated to detect additional binary files based on their content type and handler class.
    • Files with a null content type, handled by Additional_File_Handler, are now treated as binary, improving the accuracy of file type categorization.
  • Setup Task Improvements:

    • In the Setup_Task class, user-specified files and directories are now explicitly assigned to Additional_File_Handler upon initialization, allowing for consistent handling of additional files throughout the export process.

🛠️ Impact:

  • Improved Custom File Management: The new handler and binary file detection logic provide more robust support for additional file types, enhancing flexibility for user-specified files.
  • Better Export Accuracy: With improved detection of binary files and explicit handler assignment, exports are more reliable and correctly categorized.

This changeset extends Simply Static’s capabilities in managing and exporting diverse file types, particularly custom files specified by users.

@patrickposner patrickposner merged commit f693be8 into master Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plain text _header and _redirect Netlify config files are being saved as index.html files
3 participants