This adds a feature where a Remark document can request additional files to be copied without linking to them directly. This is useful when a Remark document links to a resource that depends on other resources, such as to an HTML file. To do this, the document declares a "copyfiles" code fence:
See [this generated report](report.html) for more information.
```copyfiles
report.css
diagram.png
This is option 3 discussed in feature request issue #4.
Tested with:
```bash
gatsby new test-md-blog https://github.com/gatsbyjs/gatsby-starter-blog
cd test-md-blog
npm install --save dansanderson/npm-gatsby-remark-copy-relative-linked-files
Edited gatsby-config.js to replace gatsby-remark-copy-linked-files with gatsby-remark-copy-relative-linked-files and reordered the plugins so this one comes before prismjs. Then set up an example similar to the above in the hello-world blog entry, gatsby build, gatsby serve. Confirmed that the example works.
Feel free to reject if you don't like this design. This fork works for me. :) Thanks!
This adds a feature where a Remark document can request additional files to be copied without linking to them directly. This is useful when a Remark document links to a resource that depends on other resources, such as to an HTML file. To do this, the document declares a "copyfiles" code fence:
Edited gatsby-config.js to replace gatsby-remark-copy-linked-files with gatsby-remark-copy-relative-linked-files and reordered the plugins so this one comes before prismjs. Then set up an example similar to the above in the
hello-world
blog entry,gatsby build
,gatsby serve
. Confirmed that the example works.Feel free to reject if you don't like this design. This fork works for me. :) Thanks!