Postleaf / postleaf

Simple, beautiful publishing with Node.js.
https://www.postleaf.org/
MIT License
505 stars 204 forks source link

instalation on subdirectory support added 1st stage #93

Open callingmybluff opened 6 years ago

callingmybluff commented 6 years ago

Pull Request Summary

This is the first stage into implementing the feature #90. This step replaces most static usage of root directory to an environment variable APP_LOCATION

However, with this PR, the feature is not done, and there are two issue I encountered and could not solve so far:


All code contributions are subject to the terms of the Contributor License Agreement described in CONTRIBUTING.md.

claviska commented 6 years ago

Thanks for submitting.

When a url has a redirect, like login: /sub/admin/login?redirect=%2Fadmin will direct into /admin

This may point you in the right direction.

resources from the upload directory "uploads" are links in the page to /uploads/... instead of /sub/uploads/....

I think the problem here is that the editor generates root-relative URLs. I'm not sure what side effects we'll incur by changing it to relative. It's worth experimenting with at least.

callingmybluff commented 6 years ago

I managed to do the redirect easily, but the images thing is a bit tough. I managed to change images in display while input, but that resulted in problems (storing wrong url probably?)

kylechine commented 6 years ago

I don't know if this is annoying. But I just want to say thank you, guys.