@@ -122,13 +122,16 @@ assumed that they are in `docs/src`.
122
122
* `skip_dirs=[]` same as `skip_dir` but for a vector of such dirs. Takes precedence over `skip_dir`.
123
123
* `foldername="docs"` specify the name of the content folder if different than "docs".
124
124
* `buildfoldername="build"` specify the name of the build folder if different than "build".
125
+ * `host="127.0.0.1"` where the server will start.
126
+ * `port` is an integer between 8000 (default) and 9000.
125
127
* `launch_browser=false` specifies whether to launch the ambient browser at the localhost URL or not.
126
128
"""
127
129
function servedocs (; verbose:: Bool = false , literate:: String = " " ,
128
130
doc_env:: Bool = false , skip_dir:: String = " " ,
129
131
skip_dirs:: Vector{String} = String[],
130
132
foldername:: String = " docs" ,
131
133
buildfoldername:: String = " build" ,
134
+ host:: String = " 127.0.0.1" , port:: Int = 8000 ,
132
135
launch_browser:: Bool = false )
133
136
# Custom file watcher: it's the standard `SimpleWatcher` but with a custom callback.
134
137
docwatcher = SimpleWatcher ()
@@ -151,7 +154,7 @@ function servedocs(; verbose::Bool=false, literate::String="",
151
154
152
155
# note the `docs/build` exists here given that if we're here it means the documenter
153
156
# pass did not error and therefore that a docs/build has been generated.
154
- serve (docwatcher, dir= joinpath (foldername, buildfoldername), verbose= verbose, launch_browser= launch_browser)
157
+ serve (docwatcher, host = host, port = port, dir= joinpath (foldername, buildfoldername), verbose= verbose, launch_browser= launch_browser)
155
158
if doc_env
156
159
Pkg. activate ()
157
160
end
0 commit comments