KosmosisDire / obsidian-webpage-export

Export html from single files, canvas pages, or whole vaults. Direct access to the exported HTML files allows you to publish your digital garden anywhere. Focuses on flexibility, features, and style parity.
https://docs.obsidianweb.net/
MIT License
813 stars 69 forks source link

local server option #451

Open hcgilje opened 3 months ago

hcgilje commented 3 months ago

Is your feature request related to a problem? Please describe. I find it useful to have a local server running on my computer, and have that working

Describe the solution you'd like just add a few lines about that it is possible (I described it in the obsidian forum) using http-server , and add http://127.0.0.1:8080/ to the public site url in the metadata section in preferences.

Describe alternatives you've considered I figured out how to set it up, see above. could be useful for others

Additional context https://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http

KosmosisDire commented 3 months ago

So in other words, you'd like the plugin to start its own local server to host the export? That's a good idea and I'll consider adding it in the future :) Thanks!

hcgilje commented 3 months ago

Actually I thought maybe it could be nice to mention it in the documentation that it is quite easy to set up. I used to do something similar with dokuwiki before, but found this even easier.

Very happy to discover your plugin :)

KosmosisDire commented 3 months ago

Ah, yes I can do that as well, great ideas :)

hcgilje commented 3 months ago

after further testing I see that search is not working as expected when running as local server. Maybe I am not specifying the site url correctly? It works as it should when I upload it to my website.

KosmosisDire commented 3 months ago

How is it not working correctly?

hcgilje commented 3 months ago

weird, when I was going to recreate the issue with the same structure on the web as on my local server it of course works both locally and on the web. If I am able to reproduce this again I will let you know, but probably I did something wrong at some point.

KosmosisDire commented 3 months ago

There is a known bug in the beta version that causes the export to become corrupted if the export only modified files is turned on. It's possible this caused the bug temporarily