htmly icon indicating copy to clipboard operation
htmly copied to clipboard

Multiple site.urls?

Open AmyMoriyama opened this issue 3 years ago • 5 comments

So, I want to run a website that can be accessed from tor and i2p but htmly doesn't seem to want to allow this. It seems to only want to work with one or the other and it seems it's due to the site.url config in the config file.

Is there a way around this? If not, I request some feature be added to allow multiple site urls.

AmyMoriyama avatar May 03 '22 19:05 AmyMoriyama

Please do not hesitate to submit a patch.

Hjertesvikt avatar May 03 '22 19:05 Hjertesvikt

Is there a way around this?

+1 for the feature request.

I had this working for a while, with a bit of a manual bodge: I had a second instance of htmly, used by the webserver config for the .onion URL. This used symlinks to the files of the main installation, as well as the content directory. I think I kept a separate cache as, whenever I wrote a new post, I needed to clear the cache on the Tor instance too.

I meant to take a proper look at it, to see how the site.url config is used, and what it would take to extend it to cover multiple URLs (i.e. could relative paths be used in more places, most probably), but never got round to it.

neilzone avatar May 08 '22 06:05 neilzone

how do i get plugins ?

ombhs avatar May 17 '22 10:05 ombhs

Replace this line:

https://github.com/danpros/htmly/blob/d3b6a67a57321afcb320bc1bbbe57a3ba62c6980/system/includes/dispatch.php#L21

With this:

return rtrim('https://' . $_SERVER['HTTP_HOST'], '/') . '/';

taufik-nurrohman avatar May 17 '22 16:05 taufik-nurrohman

how do i get plugins ?

This feature is not implemented yet.

fabianosantosnet avatar Jun 11 '22 22:06 fabianosantosnet

This feature already added in master branch.

danpros avatar Jan 06 '24 12:01 danpros

This feature has been added in the latest release. I will close this one.

danpros avatar Jan 11 '24 02:01 danpros