Skip to content

Conversation

@krystophny
Copy link
Collaborator

Summary

  • Fixed PDF deployment issue where files were missing from GitHub Pages (404 errors)
  • Root cause: FORD was wiping build/doc directory before media files could be preserved
  • Solution: Moved media file copying to occur AFTER FORD generation in make doc target

Technical Details

The make doc target was copying media files to build/doc/media/examples before running FORD, but FORD clears the entire build/doc directory when generating documentation. This meant PDF files were copied and then immediately removed.

Before:

  1. Copy media files to build/doc/media/examples
  2. Run FORD (wipes build/doc directory)
  3. Media files are gone

After:

  1. Run FORD to generate documentation structure
  2. Copy media files to build/doc/media/examples
  3. Media files are preserved in final deployment

Testing

Verified locally that:

  • make example ARGS="scale_examples" generates PDFs in output/
  • make doc preserves PDFs in build/doc/media/examples/
  • URL structure matches GitHub Pages expectations

The example PDF mentioned in issue #224:
https://lazy-fortran.github.io/fortplot/media/examples/scale_examples/log_scale.pdf

Should now be accessible once deployed.

Impact

Fixes all PDF download links in the documentation that were returning 404 errors.

Closes #224

FORD was wiping the build/doc directory clean before generating
documentation, removing any media files copied beforehand. This
caused PDF files to be missing from GitHub Pages deployment,
resulting in 404 errors.

Fixed by reordering the make doc target to:
1. Run FORD first to generate documentation structure
2. Copy media files after FORD completes

This ensures media files are preserved in the final build/doc
directory that gets deployed to GitHub Pages.

fixes #224
@codecov
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@krystophny krystophny merged commit 09a063e into main Aug 24, 2025
5 checks passed
@krystophny krystophny deleted the fix/pdf-deployment-224 branch August 24, 2025 05:23
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.

bug: PDF files not deployed to GitHub Pages (404 errors)

2 participants