Open oskarrough opened 8 years ago
What about option 3?
Keeping the CMS totally separate / but on the same host is great for client and developer.
There are many gotchas around pretty-permalinks and other terminal host/apache stuff that all depend on the setup. I'll try to collect the Digital Ocean issues next fresh project.
Yes, that's actually how we normally do it.
wp
subdirectoryassets
folder that ember-cli generatesindex.html
Because of the <base>
tag Ember generates, this works. Although it's a pretty frustrating workflow…
This line in functions.php
can also be critical, if you have your Ember app inside a WP theme.
// Remove canonical redirects that would otherwise overwrite the Ember routing
remove_filter('template_redirect', 'redirect_canonical');
I'm still wondering why you put the Ember app inside the WordPress theme vs just having it in the root of your host public folder - or really, anywhere else.
I might be going the wrong way about this but putting it inside a Wordpress theme allows you to let Wordpress do the initial routing BEFORE your Ember app is loaded.
This is essentially server-side rendering, which might be useful for SEO. Personally I prefer to let Google figure it out these days but some clients require it for sharing on, say, Facebook, who can't read JavaScript apps yet.
Very interesting. I'll have to check into that.
I didn't worry about it on a site - and to my surprise everything was thoroughly indexed by Google - down to the orphaned routes I had left in there ~ so I figured that wasn't a thing anymore. BUT - if there is a way to have WP just automatically do the work instead of adding fastboot - that could be really convenient.
Maybe a section in the readme with links to ember-cli-deploy and surge.sh would know this out. + a clear explanation of how the Ember app is essentially a separate entity - that doesn't really care where your WP install is. BUT there are some considerations depending on CORS and other things to ensure proper refresh... so we should try and collect those bits.
to deploy it using theme you have to convert the ember app into wordpress theme
and insert some of the server rendering script to make sure your all your pages are seo friendly `
`
🌚
You have (at least) two options:
Solution 1 is definitely the simplest as it doesn't require any extra steps but the DNS management. Solution 2 also works, but requires a few nifty tricks to work properly.
I'll have to add this to the readme. Until then, you can ask here.