Code Monkey home page Code Monkey logo

Comments (4)

biilmann avatar biilmann commented on May 13, 2024

I'll probably make it an environment settings - problem is that some static site generators (jekyll for example) can't really handle history pushstate based URLs, so without the hash you get a 404 each time there's an auto-refresh.

We can probably set the location method on the Ember app during initialization based on either the config.yml or a setting in the html page.

from decap-cms.

hhsnopek avatar hhsnopek commented on May 13, 2024

Is there a way we can, similarly a Backbone app, use Backbone.history.start({ pushState: true })?
Also considering that the page on /admin isn't part of the jekyll site and is it's own html page, can't the ember app only route using /admin as it's base, which would allow us to remove the hashbag?

from decap-cms.

biilmann avatar biilmann commented on May 13, 2024

Yes, Ember has a similar way of controlling the routing:

http://emberjs.com/api/classes/Ember.Location.html

We automatically use the /admin part as the base, and setting {location: "history"} will work fine. The problem comes when your viewing a path like:

/admin/collections/posts

And then do a browser refresh. At that point all of the static site generators will give you a 404 out of the box and you'll have to go back to /admin to get the index page...

from decap-cms.

hhsnopek avatar hhsnopek commented on May 13, 2024

Ahh right, totally forgot about that... haha my bad

from decap-cms.

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.