waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
448 stars 68 forks source link

BASEURL seems not having any effect #47

Open KarstenRiisgaard opened 1 year ago

KarstenRiisgaard commented 1 year ago

Trying to deploy to my website's subfolder (eg. www.myserver.com/mydir/) so I have set BASEURL in .env correspondingly.

However, it seems there is no effect of doing this, not in HTML Header or in the generated links, which still looks like eg.: href="/css/master.css" - using absolute path and referencing the webserver's root, not my subfulder (/mydir/ in the example mentioned before).

waschinski commented 1 year ago

To be honest, I never tested this myself. Guess there is a reason the initial creator of Photo Stream added a warning to that setting. :D I labeled this as bug for now, going to look into it once I got some spare time.

LucaDanelutti commented 1 year ago

Found a way to make it work. Just add baseurl and urlto _config.yml as in the old version and it will work as expected. If you want to use the download option you should also change in line 40 of photo.html image.path to image.path | relative_url. As far as my testing has gone everything else should work correctly.

WarrenWilkinson commented 1 year ago

I also had this problem, and LucaDanelutti's post fixed it for me. Add baseurl: "something/" to _config.yml. The BASEURL variable inside .env doesn't seem to get wired up to anything.

waschinski commented 1 year ago

Hey everyone, thanks for all the feedback, I will try to add it to the repo soon and give that change a go myself.