This PR resolves the issue with Spanish book generation failing to output files properly. The key fix is to use a flat directory structure in the build directory similar to how Rise and Code works.
Key Changes:
Flat Directory Structure:
Changed all language output files to be written directly to the build/ directory rather than language-specific subdirectories
Maintains web-specific files in language subdirectories (like build/es/index.html) for GitHub Pages
Simplified Image Handling:
Streamlined image copy process to place all images in a single location (build/images/)
Added verification to ensure cover image is properly placed
Maintained web-specific image directories for language subfolders
Enhanced EPUB Generation:
Simplified cover image discovery by using a standard location
Added better diagnostics for verifying file generation
Reduced file size thresholds for warnings to catch empty files early
Improved Setup Phase:
Made directory creation more explicit
Added better verification of environment
Ensured all necessary directories exist at the start
Testing:
I've focused on making the changes minimal while ensuring both English and Spanish versions can be generated in the same build. The core problem was that we're creating Spanish files in a language-specific subfolder (build/es/) instead of directly in the root directory as the release process expects.
By replicating the flat organization approach from Rise and Code, we ensure that Spanish files are created in the same location as English files, with different filenames based on language.
This PR should resolve the issue without breaking the working English generation.
Fix for Spanish Book Generation
This PR resolves the issue with Spanish book generation failing to output files properly. The key fix is to use a flat directory structure in the build directory similar to how Rise and Code works.
Key Changes:
Flat Directory Structure:
build/
directory rather than language-specific subdirectoriesbuild/es/index.html
) for GitHub PagesSimplified Image Handling:
build/images/
)Enhanced EPUB Generation:
Improved Setup Phase:
Testing:
I've focused on making the changes minimal while ensuring both English and Spanish versions can be generated in the same build. The core problem was that we're creating Spanish files in a language-specific subfolder (
build/es/
) instead of directly in the root directory as the release process expects.By replicating the flat organization approach from Rise and Code, we ensure that Spanish files are created in the same location as English files, with different filenames based on language.
This PR should resolve the issue without breaking the working English generation.