Skip to content
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

Add CNAME and 404.html #5

Open
gr2m opened this issue Jul 30, 2016 · 1 comment
Open

Add CNAME and 404.html #5

gr2m opened this issue Jul 30, 2016 · 1 comment

Comments

@gr2m
Copy link

gr2m commented Jul 30, 2016

Thanks a lot for this plugin, it worked out-of-the-box for me, which is amazing given I’m still very new to Ember 👏

I wonder if we could add options so that the deploy would add a CNAME file with a custom domain, and optionally a 404.html which would be the same as index.html so that we don’t need the ENV.locationType = 'hash'; setting. It’s somewhat of a hack because the server responds with 404 status, but user’s don’t care, the app will still show

Happy to help with this if you point me to the right places. Or maybe there is a workaround for what I need? I’d greatly appreciate your help. Thanks!

@ef4
Copy link
Owner

ef4 commented Jul 30, 2016

The CNAME file can go in your public directory and it should just work.

You can copy the built index.html to 404.html by extending your ember-cli-build.js file. I made a gist that shows how.

The copying step would make a fine standalone addon (implemented via postProcessTree). Alternatively, it could be done as an ember-cli-deploy plugin. In either case I think it's good to keep it separate from this addon because copying is a general-purpose need that other deploy pipelines may want to share too.

LevelbossMike added a commit to effective-ember/ember-showcase that referenced this issue Jun 8, 2020
Without a CNAME file we will need to set this manually through
settings again after a deployment - we can just add it to `public`
instead.

Reference:
ef4/ember-cli-deploy-git#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants