fix: copy collection static files to Jekyll output#53
Merged
Conversation
Jekyll collections in _-prefixed directories generate HTML pages for documents but do not automatically output static files (audio, images, etc.) alongside them. This adds a Jekyll generator plugin that copies non-document files from collection directories into _site/ at the correct paths, making audio and download files accessible. Also adds the type attribute to <source> elements for better browser compatibility with audio playback. Co-Authored-By: Paperclip <noreply@paperclip.ing>
tallnato
commented
Mar 27, 2026
Member
Author
tallnato
left a comment
There was a problem hiding this comment.
Code Review (Revinaldo)
No issues found. Checked for bugs and CLAUDE.md compliance.
_plugins/copy_collection_files.rb— correctly copies static files from_-prefixed collection dirs to_site/output. Path construction,Pathnameusage, andDir.globfiltering are all sound._layouts/item.html— MIME type detection via Liquid is correct;typeattribute is conditionally added only for known formats (mp3,wav,ogg).
LGTM — good to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_plugins/copy_collection_files.rb) that copies non-document static files (.mp3,.wav,.fseq,.png, etc.) from_-prefixed collection directories into the_site/output at the correctcontent/{collection}/{slug}/pathstypeattribute to<source>elements in_layouts/item.htmlfor better browser audio compatibility (mp3→audio/mpeg, wav→audio/wav, ogg→audio/ogg)Why
Jekyll processes collection documents (Markdown) into HTML pages but does not automatically copy static files from
_-prefixed collection directories to the build output. Audio files, thumbnails, and downloadable files were missing from the deployed site, breaking<audio>playback and download links.How to verify
npm install && npm run build && bundle exec jekyll build_site/content/:_site/content/boombox/sample-track/sample-track.mp3_site/content/locksounds/sample-chime/sample-chime.wav_site/content/lightshows/sample-show/sample-show.fseq_site/content/wraps/sample-wrap/sample-wrap.png<source>elements includetypeattributes in generated HTMLbundle exec jekyll serve) and in the deploy workflowTest plan
jekyll buildsucceeds with all static files in_site/content/<source>elements include correcttypeattributes🤖 Generated with Claude Code