Run ghost in development with unminified vendor bundle

Hey, I’m looking to try to unpack how ghost routing occurs. Specifically, I’m confused about how /ghost reroutes to -> /ghost/#/setup/one when a user is not authenticated, it seems to be some concatenation of api + client side logic.

Is there a way to run the ghost client without a minified vendor bundle? I can see calls like _handleResolvedContinueValue being made in the client but I can’t find it in the project’s directory.

I’d also like to modify certain parts of this flow, like for example changing the theme/color or a field or two; what’s the best way to approach this?

How is this approached? Thank you.

@nikkwong the admin app is built with Ember.js, you can find the source code here GitHub - TryGhost/Admin: Ghost's admin client. You can read more about Ember’s routing in their docs Introduction - Routing - Ember Guides.

Regarding general authentication redirects that will take any admin route and redirect to /#/setup/one when setup hasn’t been completed or /#/signin when not authenticated, we use the ember-simple-auth addon with a custom cookie authentication.

Specifically regarding the /#/setup/one redirect that you’ve asked about, that is handled on unauthenticated routes using the unauthenticated-route mixin. It makes a request to /ghost/api/{version}/admin/authentication/setup/ and will redirect to the setup screen if the response indicates that setup is not complete.

If you want to run Ghost without minified vendor JS then you’ll need to install Ghost from source. You can find docs for that here:

1 Like