You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
before I even discovered servedocs, I was using LiveServer in a more "manual way". Something like:
using Revise, LiveServer, REPL.TerminalMenus
@asyncserve(; dir=joinpath(@__DIR__, "build"), 8000)
menu =RadioMenu(["Run again!", "Quit!"])
whiletruerevise()
@info"Start building docs..."tryinclude("make.jl")
catch e
@info"make.jl error" e
endprintln("\nDocs are served at http://localhost:$port")
ifrequest("What now?", menu) !=1breakendend
Which essentially starts a server, builds the docs and ends with a prompt to rebuild, so the users can just hit enter to revise and start the whole build again (reusing the same Julia process for performance). For me this is great if you have:
long running @example blocks and don't want to trigger build whenever you accidentally hit save (which I often do mindlessly after every character 😅)
fiddle around with doc strings (as it calls revise and rebuilds) (ref Watch docstrings #140 )
On the other hand, servedocs is just great when using draft=true, focusing on equations, formatting and stuff like that. Since I find myself switching between the two modes constantly, I was wondering whether it would make sense to include such a manually triggered, full rerun of make.jl execution mode in servedocs. So one could call
servedocs(...; watch_files=true) # default
servedocs(...; watch_files=false) # asks users for rebuild and includes make again
This would simplify the localmake.jl scripts in have in nearly all of my packages.
Would something like that be a usefull contribution? Or do you consider it out of scope for this package as it can be already achieved with a few lines of user code?
Now that I think about, this feature would essentially require two parts:
add an option to switch rebuild trigger between file watch and manual prompt
add a package extension for Revise and add a revise=true/false keyword. If Revise is loaded and revise==true, it could trigger revise() within the servedocs_callback! (this would probably also solve Watch docstrings #140
Hello,
before I even discovered
servedocs, I was using LiveServer in a more "manual way". Something like:Which essentially starts a server, builds the docs and ends with a prompt to rebuild, so the users can just hit enter to revise and start the whole build again (reusing the same Julia process for performance). For me this is great if you have:
@exampleblocks and don't want to trigger build whenever you accidentally hit save (which I often do mindlessly after every character 😅)On the other hand,
servedocsis just great when usingdraft=true, focusing on equations, formatting and stuff like that. Since I find myself switching between the two modes constantly, I was wondering whether it would make sense to include such a manually triggered, full rerun of make.jl execution mode inservedocs. So one could callThis would simplify the
localmake.jlscripts in have in nearly all of my packages.Would something like that be a usefull contribution? Or do you consider it out of scope for this package as it can be already achieved with a few lines of user code?
Now that I think about, this feature would essentially require two parts:
revise=true/falsekeyword. If Revise is loaded andrevise==true, it could triggerrevise()within theservedocs_callback!(this would probably also solve Watch docstrings #140