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

Fix Admin interface with sub directories #1577

Merged
merged 2 commits into from
Nov 28, 2013

Conversation

halfdan
Copy link
Contributor

@halfdan halfdan commented Nov 27, 2013

This PR fixes most of the admin interface to work with a subdirectory configured.

Issues left for full subdir support:

  • Cleanup paths in core/server/
  • Image upload is borked (localStorage returns wrong path)
  • Blog Cover/User Cover don't show properly (client-side template)

I'm going to address the remaining issues today. Since this PR adds the asset helper that @bastilian is working on I wanted to get this merged first.

@ErisDS
Copy link
Member

ErisDS commented Nov 28, 2013

So in terms of cleaning up paths, one of the problems we have is that the base path or subdir is often '/'. We should not use path.join for URLs because this produces the incorrect result on Windows.

We need to ensure there is consistency - does the subdir always end with a slash even if it is just slash?

If so, we either add a non-slashed version, which is ugly, or we can use url.resolve() instead of path.join.

@halfdan
Copy link
Contributor Author

halfdan commented Nov 28, 2013

@ErisDS, I don't recall using a path.join in the PR? After this PR I wanted to clean up paths by writing a new utils module with a helper that will handle these issues, but I guess we could enforce the trailing slash and then use url.resolve.

@ErisDS
Copy link
Member

ErisDS commented Nov 28, 2013

No it's not in this PR, I was responding to your todo list just while I thought of it.

ErisDS added a commit that referenced this pull request Nov 28, 2013
Fix Admin interface with sub directories
@ErisDS ErisDS merged commit 7b2bf5b into TryGhost:master Nov 28, 2013
@halfdan halfdan deleted the 527-subdir-admin branch November 28, 2013 14:22
ErisDS added a commit to ErisDS/Ghost that referenced this pull request Nov 28, 2013
issue TryGhost#1577

- adding asset helper for subdirectory support
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

Successfully merging this pull request may close these issues.

None yet

3 participants