Can you have non-Ember HTML pages within an app built with ember-cli?


#1

I have a traditional website that I need to build. I want to use Ember for the majority of it, but there are a few standalone HTML pages that I want loaded without Ember. For example, I’d like to have an about.html page that just loads as a normal HTML file without Ember for SEO purposes. I also have another standalone HTML file that uses a lot of Angular. Is it possible to have traditional HTML pages sitting next to the index.html within an ember-cli app?

I tried creating some html files in the app directory and navigating to them, but the Ember router catches them first.

Thanks!


#2

I believe the public folder will help accomplish this. From the EmberCLI docs:

This folder will be copied verbatim into the root of your built application. Use this for assets that don’t have a build step, such as images or fonts.


#3

Yes, everything in public folder will be copied to your /dist folder by broccoli when you build. You can even use broccoli to build, concat or munge anything together assuming you are trying to do something more complicated than static html pages.

If you need to insert content into a page you should check out the contentFor hook.

http://www.ember-cli.com/#content

Hope that helps.