Skip to content

Commit 09a063e

Browse files
authored
fix: PDF files not deployed to GitHub Pages (#226)
## 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
1 parent 1111ad8 commit 09a063e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

BACKLOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Development Backlog
22

33
## TODO (Ordered by Priority)
4-
- [ ] #224: PDF files not deployed to GitHub Pages (404 errors)
54

65
## DOING (Current Work)
7-
- [x] #223: ASCII backend generates empty plots (only frames/borders) (branch: fix/ascii-empty-plots-223)
6+
- [x] #224: PDF files not deployed to GitHub Pages (404 errors) (branch: fix/pdf-deployment-224)
87

98
## DONE (Completed)
9+
- [x] #223: ASCII backend generates empty plots (only frames/borders)
1010
- [x] #220: Fix ASCII backend generating PDF binary content instead of text output

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ run-release:
9090

9191
# Build documentation with FORD
9292
doc:
93-
# Copy example media files to doc build directory BEFORE running FORD for proper linking
93+
# Run FORD first to generate documentation structure
94+
ford README.md
95+
# Copy example media files to doc build directory AFTER running FORD
9496
mkdir -p build/doc/media/examples
9597
# Copy from doc/media if it exists (GitHub Actions workflow populates this)
9698
if [ -d doc/media/examples ]; then cp -r doc/media/examples/* build/doc/media/examples/ 2>/dev/null || true; fi
@@ -105,8 +107,6 @@ doc:
105107
cp "$$dir"*.mp4 "build/doc/media/examples/$$example_name/" 2>/dev/null || true; \
106108
fi; \
107109
done
108-
# Now run FORD after media files are in place
109-
ford README.md
110110

111111
# Generate coverage report
112112
coverage:

0 commit comments

Comments
 (0)