-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
There should be a way to ignore the build process on certain files in the pages directory other than simply copying from the pages directory to the public directory. #450
Comments
Yeah — this is a decently common request. I think the best thing now is to just implement the In 1.0, with its plugin system, my plan is to add an officially supported plugin which will make this very simple e.g.
I'm also thinking there'll be an official "core theme" that is part of the official themes and others can build themes on top of (themes will be composable) and it could have this plugin installed by default. How's that sound? Also, what do you think a directory for these sort of files should be called? |
That sounds great @KyleAMathews I ended up adding a In regards to the name of such a directory, I think the name |
Thinking about this further @KyleAMathews , we may be complicating things. I'm thinking there should be a directory named 'static' in the root of the project that is served from /static in local development and then upon build gets copied to public/static. That way any files in that directory would remain untouched and we wouldn't have to worry about side effects, etc. |
Closed as this functionality is added to gatsby 1.0 |
I'd like to propose something like a .leave-these-files-alone file where we could specify files that shouldn't be put through the Gatsby build process other than copying
For example, I have a google webmaster tools verification file called blahblah.html and I want that to simply be copied from my pages directory into my public directory in the build process instead of it being converted to a folder named blahblah with an index.html file in it and I want to add a runprettify.js file to my pages directory and have it be simply copied upon build instead of Gatsby trying to process the file resulting in freakouts from window not being available.
I hope what I'm asking is making sense. I know with a lot of these things, doing things the React way solves the issue. But it would be nice to be able to add files or directories to the .leave-these-files-alone file and have those files/directories just copied instead of being processed.
Any thoughts from anyone are welcome. I plat to start implementing within the next few weeks.
The text was updated successfully, but these errors were encountered: