Summary
Upload attachments to external storage, rewrite URLs in published content.
Upload Targets
- S3-compatible storage
- Custom upload function (user-defined)
URL Rewriting
- Replace local attachment paths with remote URLs
- Handle relative vs absolute paths
- Cache uploaded asset URLs to avoid re-upload
Asset Tracking
- Know which assets are used by which outputs
- Clean up orphaned remote assets (optional, dangerous)
Configuration
(porg-project
...
:assets
(:upload-fn #'my-s3-upload
:url-prefix "https://assets.barberry.io/"
:cache-file "~/.cache/porg-assets.el"))
Open Questions
- Sync vs async upload?
- How to handle upload failures mid-build?
- Image optimisation as part of pipeline? (Resize, compress)
Summary
Upload attachments to external storage, rewrite URLs in published content.
Upload Targets
URL Rewriting
Asset Tracking
Configuration
Open Questions