Giter Site home page Giter Site logo

Comments (7)

matheusdavidson avatar matheusdavidson commented on May 27, 2024 1

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.

jakecraige avatar jakecraige commented on May 27, 2024

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.

jakecraige avatar jakecraige commented on May 27, 2024

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.

matheusdavidson avatar matheusdavidson commented on May 27, 2024

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.

elwayman02 avatar elwayman02 commented on May 27, 2024

@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.

knownasilya avatar knownasilya commented on May 27, 2024

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.

notngan avatar notngan commented on May 27, 2024

@matheusdavidson Awesome! šŸ¤Ŗ Feels Iā€™m a hacker now!

from ember-cli-github-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.