Gatsby: Copy static folder for each theme develop-time

Created on 13 May 2019  路  8Comments  路  Source: gatsbyjs/gatsby

Issue moved from https://github.com/ChristopherBiscardi/gatsby-theme-examples/ at the request of @ChristopherBiscardi.

The static folder in each theme should be copied into the final static dir. Right not only the user's is.

not stale themes

Most helpful comment

I'm experiencing this issue with trying to provide a webfont in my theme's static folder

All 8 comments

I think some clarification is needed here. On builds it seems that static directories are being copied already ( https://github.com/gatsbyjs/gatsby/blob/d4b60f2b900a59b70dd2d97cf14125c77c1de4df/packages/gatsby/src/utils/get-static-dir.js#L6-L30 ). For development it's not happening, so syncStaticDir is function that need to be updated to handle themes static directories

this PR handled themes directories for builds. As you've said, we need to update syncStaticDir for development.

So it sounds like these lines basically just need to appear again inside of the syncStaticDir folder as well to be keeping files in the public directory up to date with what's happening during gatsby develop? Is that a correct understanding?

https://github.com/gatsbyjs/gatsby/blob/d4b60f2b900a59b70dd2d97cf14125c77c1de4df/packages/gatsby/src/utils/get-static-dir.js#L13-L25

@gillkyle basically, yes. We also need to make sure the order of copying over is preserved though. So if a file changes and a later package in the theme order has a file named the same in the same location, the last file wins.

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 馃挭馃挏

Hey again!

It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.

Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

Any news on this?

I'm experiencing this issue with trying to provide a webfont in my theme's static folder

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

kalinchernev picture kalinchernev  路  3Comments

jimfilippou picture jimfilippou  路  3Comments

dustinhorton picture dustinhorton  路  3Comments

totsteps picture totsteps  路  3Comments