Install and configure gatsby-remark-copy-linked-files #81
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.
This adds the gatsby-remark-copy-linked-files plugin.
This is necessary for non-image files, which are currently handled for us by the gatsby-remark-images plugin. Notably, the
gatsby-remark-images
mentions thegatsby-remark-copy-linked-files
plugin is necessary for image types that it doesn't handle:The motivation for this PR is so that we can include MP4s in blog posts. I explored the various options and considerations for this in #75.
In the future, we may also want to add the gatsby-remark-videos plugin, which automatically handles/converts/resizes video files similar to the way that
gatsby-remark-images
works. Thegatsby-remark-videos
plugin also mentions the need forgatsby-remark-copy-linked-files
in its docs:So it seems that this plugin (
gatsby-remark-copy-linked-files
) is the standard way to handle copying linked files.I expect that this will work naturally with both our
gatsby-source-filesystem
plugin (which sources files from this repo), and ourgatsby-source-git
plugin (which sources files from remote repos like farmOS-community-blog).