Hey - thanks for the awesome Franklin.jl!
Is it possible to generate a site which can be accessed locally without a webserver - i.e. using just a local URL like file:///C:/Users/foo/bar/index.html.
Currently, it seems a running web server is neccesary to resolve links to assets (.js, .css) and to turn a link such as /menu1/ into menu1/index.html
Hello @nielsls ; no you need a web server to get everything working properly (*). Note that the Julia one (LiveServer.jl) is lightweight and reliable, this takes under 2s to launch on my machine:
$> julia -O0 -e "import LiveServer as LS; LS.serve(dir=\"__site\", launch_browser=true)"
and you could alias that to
preview or something.
(*) this is not really a Franklin limitation, just how things go to make sure the web browser knows what assets to load etc. You can make standalone HTML pages (e.g. Jupyter notebook to HTML) but that’s typically not what static site generators do as it makes the pages super heavy and messy.
Ok - thanks for fast response!
However, depending on Julia (or something else for setting up a web server) is not viable. My usecase is just creating a small set of webpages with some info for my co-workers that they can view locally.
But no worries - should be fairly easy to do automatic search-and-replace on the generated pages to make them web-server-independent.
I think that Weave.jl might be closer to what you’re looking for in terms of generating standalone pages.
With respect to your co-workers, wouldn’t it be possible to host the page(s) on some internal server and just point them to that? (if you don’t want to have something public).
Nope, I definitely want Franklin and its nice templates. Want a “proper” web-site with sidebar, multiple pages etc.
Was just looking for easy deployment on a shared drive instead of having to involve corporate IT to get access to an internal server (not a big fan of corporate IT…)
But I’ll find a way - and again - thx for the great work on Franklin!
haha, I see; well in case your colleagues have python3 installed they can also call
python3 -m http.server 8000 from
__site and navigate in their browser to
localhost:8000. This doesn’t require any installation on their parts assuming they have python3 (they might still find that annoying though).