aboutsummaryrefslogtreecommitdiff
path: root/serve_options.go
AgeCommit message (Collapse)Author
2026-02-07all: embed struct [lib/http.ServerOptions] directly to [ServeOptions]Shulhan
At this point, all of the fields in the struct ServeOptions is the same with [lib/http.ServerOptions] except IsDevelopment and ConvertOptions. For field IsDevelopment we keep in the struct. For field ConvertOptions we remove it and let the caller pass it on Serve function or InitHTTPServer method.
2026-02-02all: add field Listener to ServeOptionsShulhan
The field Listener allow passing [net.Listener] instance for accepting HTTP connection. One of the use case is to activate the ciigo serve using systemd.socket(5).
2024-03-21all: add server option to automatically generate index HTMLShulhan
If the requested path is directory and no "index.html" file exist in that directory, ciigo server will render list of files as "index.html" automatically.
2024-03-05all: replace module "share" with "pakakeh.go"Shulhan
2022-08-06all: cleaning up codesShulhan
2022-05-19all: reformat all files using latest goimportsShulhan
While at it, replace any use of ioutil with os/io package.
2022-03-04all: re-licensing ciigo under GPL-3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2022-02-19all: add option IsDevelopment to ServeOptionsShulhan
If the IsDevelopment option set to true, the serve function will serve the root directory directly and watch all asciidoc files for changes and convert it. This is like running Watch, Convert and Serve at the same time.
2021-04-03all: add option to exclude certain paths using regular expressionShulhan
The ConvertOptions now has the Exclude field that can contains regular expression. If the Exclude is not empty, it will be compiled and use in Convert, Generate, Watch, and Serve; to ignore specific paths being scanned.
2021-04-03all: change the Serve signature to ServeOptionsShulhan
Previously, we pass four parameters to Serve function: the instance to memfs.MemFS, the root directory, the address to listen, and path to HTML template. In case we need to add new parameter in the future, the Serve function signature will changes and this is not good for consumer of API. This commit changes the Serve function parameters to ServeOptions so we can add optional parameter in the future without changes to its signature.