{"action":"closed","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2779","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2779/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2779/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/2779/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/2779","id":271085720,"node_id":"MDU6SXNzdWUyNzEwODU3MjA=","number":2779,"title":"[gatsby-remark-copy-linked-files] Add config option for destination directory","user":{"login":"Undistraction","id":161489,"node_id":"MDQ6VXNlcjE2MTQ4OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/161489?v=4","gravatar_id":"","url":"https://api.github.com/users/Undistraction","html_url":"https://github.com/Undistraction","followers_url":"https://api.github.com/users/Undistraction/followers","following_url":"https://api.github.com/users/Undistraction/following{/other_user}","gists_url":"https://api.github.com/users/Undistraction/gists{/gist_id}","starred_url":"https://api.github.com/users/Undistraction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Undistraction/subscriptions","organizations_url":"https://api.github.com/users/Undistraction/orgs","repos_url":"https://api.github.com/users/Undistraction/repos","events_url":"https://api.github.com/users/Undistraction/events{/privacy}","received_events_url":"https://api.github.com/users/Undistraction/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-03T19:02:42Z","updated_at":"2018-07-29T18:44:55Z","closed_at":"2018-07-29T18:44:54Z","author_association":"CONTRIBUTOR","body":" Would you accept a PR for adding a config option to gatsby-remark-copy-linked-files that would allow the destination directory to be selected?\r\n\r\nThe config would look like this:\r\n\r\n```\r\nplugins: [\r\n  {\r\n    resolve: `gatsby-transformer-remark`,\r\n    options: {\r\n      plugins: [\r\n        { \r\n          resolve: 'gatsby-remark-copy-linked-files',\r\n          options: {\r\n            ignoreFileExtensions: [],\r\n            destinationDir: 'downloads'\r\n          },\r\n        }\r\n      ]\r\n    }\r\n  }\r\n]\r\n```\r\n\r\nThis would allow a user to have their downloads served from the specified directory instead of the root:\r\n\r\n```\r\nexample.com/downloads/alpha.pdf\r\nexample.com/downloads/bravo.pdf\r\nexample.com/downloads/charlie.pdf\r\n```\r\n\r\nEffectively whatever dir or path is specificed in `destinationDir` will be placed inside the public dir. It looks like it should be pretty easy to add - just a matter of swapping out the hardcoded 'public' dir for a config option with a default to `public` and some validation of the config option. \r\n"}}
{"actor":{"display_login":"giraffesyo"}}