Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-remark-copy-linked-files): change default destinationDir and allow override via config #16508

Merged
merged 2 commits into from
Aug 10, 2019
Merged

feat(gatsby-remark-copy-linked-files): change default destinationDir and allow override via config #16508

merged 2 commits into from
Aug 10, 2019

Conversation

kimbaudi
Copy link
Contributor

@kimbaudi kimbaudi commented Aug 9, 2019

Description

change default destinationDir & make it customizable

  1. change the default destination format from filename-hash.ext to hash/filename.ext
  2. allow customization of the destination format:
    destinationDir: f => `${f.hash}/${f.name}`  // f7fbd/myfile.txt
    destinationDir: f => `${f.name}-${f.hash}`  // myfile-f7fbd.txt
    destinationDir: f => `foo${f.hash}---${f.name}bar`  // foof7fbd---myfilebar.txt
    destinationDir: f => `foo${f.hash}/${f.name}bar`  // foof7fbd/myfilebar.txt

Related Issues

#10048

@kimbaudi kimbaudi requested a review from a team as a code owner August 9, 2019 23:13
Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Can you document the new option in README please?

@sidharthachatterjee sidharthachatterjee changed the title feat(gatsby-remark-copy-linked-files): change default destination & make it customizable feat(gatsby-remark-copy-linked-files): change default destinationDir and allow override via config Aug 9, 2019
@kimbaudi
Copy link
Contributor Author

kimbaudi commented Aug 9, 2019

@sidharthachatterjee - yes

@kimbaudi kimbaudi requested a review from a team as a code owner August 10, 2019 04:26
@kimbaudi
Copy link
Contributor Author

@sidharthachatterjee - I (finally) updated the README for this plugin

@sidharthachatterjee
Copy link
Contributor

Wow, nice work on the readme! Thank you 🙌🏼

@sidharthachatterjee sidharthachatterjee added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Aug 10, 2019
@gatsbybot gatsbybot merged commit 19eab87 into gatsbyjs:master Aug 10, 2019
@kimbaudi kimbaudi deleted the topics/improve-remark-copy-linked-file-naming branch August 10, 2019 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants