Skip to content

fix: serve Swiper and Plotly from local vendor files instead of CDN#341

Merged
lstein merged 3 commits into
masterfrom
claude/issue-339-20260629-0223
Jun 29, 2026
Merged

fix: serve Swiper and Plotly from local vendor files instead of CDN#341
lstein merged 3 commits into
masterfrom
claude/issue-339-20260629-0223

Conversation

@lstein

@lstein lstein commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Fixes #339 (and the original #111)

Replaces three CDN links in main.html with versioned local static paths so the app works fully offline after installation.

After merging: run make vendor and commit the generated static/vendor/ files before publishing the next release.

Generated with Claude Code

github-actions Bot and others added 3 commits June 29, 2026 02:32
Replaces three CDN links in main.html (cdn.jsdelivr.net/swiper@11 and
cdn.plot.ly/plotly-3.0.1) with versioned local static paths so the app
works fully offline after initial installation.

- main.html: swap CDN hrefs for static_url('vendor/…') references
- scripts/download-vendor.py: one-shot script that downloads the three
  files (swiper-bundle.min.css, swiper-bundle.min.js, plotly.min.js) into
  photomap/frontend/static/vendor/ so they are bundled with the pip package
- Makefile: add `make vendor` target that runs the download script
- photomap_server.py: log an actionable error on startup if any vendor
  file is missing, rather than silently falling back to a CDN that may
  be unreachable
- .gitignore: track scripts/download-vendor.py (scripts/* was excluded)

NOTE: after merging this PR, run `make vendor` from the repo root and
commit the generated files in photomap/frontend/static/vendor/ before
publishing the next release.

Closes #339
Fixes #111

Co-authored-by: Lincoln Stein <lstein@users.noreply.github.com>
@lstein lstein enabled auto-merge (squash) June 29, 2026 02:40
@lstein lstein merged commit f33d298 into master Jun 29, 2026
9 checks passed
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.

active internet connection still required / no offline mode

1 participant