diff options
| author | Shulhan <ms@kilabit.info> | 2022-05-22 15:57:52 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-05-22 16:14:35 +0700 |
| commit | a676f04d2f8c1981fc953cc2e87adf059e23089a (patch) | |
| tree | d86300df47d53abdf7ccb0342f96ddd3a677fbd4 /cmd | |
| parent | bb08b5bb6ad6cf3e1c409db7d69ace4364e7bc8d (diff) | |
| download | rescached-a676f04d2f8c1981fc953cc2e87adf059e23089a.tar.xz | |
all: move the documentation under _www/doc directory
This also allow the latest/released documentation viewed on
the web user interface under /doc path.
While at it, reformat HTML and CSS files using js-beautify and
JavaScript files using clang-format [1].
[1] https://google.github.io/styleguide/jsguide.html#formatting
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/rescached/main.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmd/rescached/main.go b/cmd/rescached/main.go index 52b9a44..6173943 100644 --- a/cmd/rescached/main.go +++ b/cmd/rescached/main.go @@ -13,6 +13,7 @@ import ( "syscall" "time" + "git.sr.ht/~shulhan/ciigo" "github.com/shuLhan/share/lib/debug" "github.com/shuLhan/share/lib/memfs" @@ -61,6 +62,7 @@ func main() { case cmdDev: running = make(chan bool) go watchWww(env, running) + go watchWwwDoc() } rcd, err = rescached.New(env) @@ -154,3 +156,20 @@ func watchWww(env *rescached.Environment, running chan bool) { dw.Stop() running <- false } + +func watchWwwDoc() { + var ( + logp = "watchWwwDoc" + convertOpts = ciigo.ConvertOptions{ + Root: "_www/doc", + HtmlTemplate: "_www/doc/html.tmpl", + } + + err error + ) + + err = ciigo.Watch(&convertOpts) + if err != nil { + log.Fatalf("%s: %s", logp, err) + } +} |
