Comments (7)
For anyone searching on how to use emberjs or ember cli with non hash urls on github pages(gh-pages) the solution is pretty simple.
This sort of config should be done on the server, but github pages won't allow you to modify server config, so how can it be done?
Easy:
Copy your index.html file to a 404.html file and upload the 404.html in the root directory where your index.html is and everything will work fine even when you reload the page.
from ember-cli-github-pages.
haha that's an awesome hack @matheusdavidson
This issue is related to #1 I should be able to take some time today to fix that and this.
from ember-cli-github-pages.
closing based on that referenced commit. The generator now sets it to hash by default. If this is something more people want we could have an option that will auto generate the 404 for you so it works without it.
from ember-cli-github-pages.
uahuah
i was crazy looking for a solution, after two days googling around and trying everything i could, i came up with this hack as my last try š
from ember-cli-github-pages.
@jakecraige for some reason the blueprint did not work when installed in an addon...maybe it is not looking at tests/dummy/config/environment.js
?
What I found to be a slicker solution was to simple add ENV.locationType = 'hash';
inside the if (environment === 'production')
block (same as how you have to set ENV.baseURL
). IMO that is a better solution than this addon assuming that the user wants to use hash locations in all environments.
from ember-cli-github-pages.
Both of those settings are updated with the latest version of the addon. It should also automatically update your dummy config.
from ember-cli-github-pages.
@matheusdavidson Awesome! š¤Ŗ Feels Iām a hacker now!
from ember-cli-github-pages.
Related Issues (20)
- Directly requesting sub routes causes 404 HOT 4
- Adding only dist folder to the gh-pages/master branch HOT 1
- Create the gh-pages branch if not existent HOT 7
- `returnToPreviousCheckout` doesn't work HOT 2
- Comaintainers needed HOT 3
- ember-bootstrap assets not loading HOT 3
- Command hangs HOT 6
- Installation instruction deleted all my work HOT 13
- Does this work with the new rootURL? HOT 4
- Custom Domain Configuration Overwritten HOT 2
- Checkbox tick png missing on demo site HOT 2
- Radio button not working on demo site HOT 2
- Deploying a second time does not remove previous build's files
- Ember 2.18 deprecation HOT 2
- Command failed HOT 5
- Query params not being picked up HOT 1
- Version 0.2.0 Not Tagged in GitHub HOT 1
- Fails if the default bash is FISH HOT 9
- Readme deploy script does not build for production
- SHA hash mismatch? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-github-pages.