Closed adigitalnative closed 5 years ago
Hi @adigitalnative,
I saw you closed this, but I'm going to reopen it to remind me to put some clearer instructions in the readme
for deployment. And just to be clear, yes, the build
folder can be deployed. Also, the build
folder is copied to the root. So you could deploy from there, just leaving off the react-src
folder in that case.
Thanks!
Great! I felt a little silly asking after I poked around for a moment and figured out how to deploy, but more info would be good for future users.
One little thing I ran into, and this may be a configuration issue on my end: the 'build' folder contents, not the folder itself, needs to end up in a folder with the same name as what you used to create-react-wptheme. Not a major issue/I was able to troubleshoot pretty quickly, but I could see it causing some confusion for newer devs trying to take a site to production.
You bring up issue I’ve mentally struggled with since I started this project. You need the index.php and style.css files to be in root for Wordpress to consider the folder as a valid theme. So I consider the “react-src” folder as something that is inherently confusing.
I’ve thought and thought on it, but can’t really come up with an idea that meets all the technical requirements and is easy to understand for users... and so far, I still think it’s a bit confusing.
Any suggestions are welcome. I’ll try anything. More instructions on screen while developing..? More instructions in the readme...?
Anyway I’m out of town this week but I’ll look at any suggestions when I get home this weekend.
Thanks!
Solutions:
If you'd like a PR with some basic 'how to' info in the readme, I might be able to whip something super basic up.
Jacqueline Chenault jq@nativefoundry.com
202.489.6128 Github | Linkedin | Portfolio
On Jun 5, 2019, 2:40 PM -0400, devloco notifications@github.com, wrote:
You bring up issue I’ve mentally struggled with since I started this project. You need the index.php and style.css files to be in root for Wordpress to consider the folder as a valid theme. So I consider the “react-src” folder as something that is inherently confusing. I’ve thought and thought on it, but can’t really come up with an idea that meets all the technical requirements and is easy to understand for users... and so far, I still think it’s a bit confusing. Any suggestions are welcome. I’ll try anything. More instructions on screen while developing..? More instructions in the readme...? Anyway I’m out of town this week but I’ll look at any suggestions when I get home this weekend. Thanks! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @adigitalnative,
I just updated the readme and build code. I think it's better. The changes to the readme are mostly choosing phrases that make more sense "Developing Your Theme" and "Deploying Your Theme" for example.
Then I made changes to the build script. Here's what it does now:
There is an outline of the file/folder structure after a build in the readme here.
Anyway, if you get a chance to take a look, please let me know what you think.
Is there any additional info about deployment located somewhere?
I've run the wpbuild and dropped the build folder into my server. I'm getting a white screen and 404 errors - any thoughts or pointers on how to troubleshoot?