aboutsummaryrefslogtreecommitdiff
path: root/ciigo.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-23 15:33:13 +0700
committerShulhan <ms@kilabit.info>2026-01-24 07:11:24 +0700
commit62c2e03409e8f7bc6f3f20df36603344afaf2b3a (patch)
tree0235899db041244ecabc754ca636d7bbd651d1e0 /ciigo.go
parent8970c0fef45c87c183a27f8a66d9620fdb6daa1e (diff)
downloadciigo-62c2e03409e8f7bc6f3f20df36603344afaf2b3a.tar.xz
all: embed CSS and index HTML template using memfs
Previously, with direct embed, every time we change the CSS or index template, we need to restart the "ciigo serve" command. Using memfs make us easy to update and see the changes directly, without restarting the server.
Diffstat (limited to 'ciigo.go')
-rw-r--r--ciigo.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/ciigo.go b/ciigo.go
index 0977673..dfecf12 100644
--- a/ciigo.go
+++ b/ciigo.go
@@ -1,5 +1,5 @@
-// SPDX-FileCopyrightText: 2019 M. Shulhan <ms@kilabit.info>
// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-FileCopyrightText: 2019 M. Shulhan <ms@kilabit.info>
// Package ciigo is a program to write static web server with embedded files
// using the asciidoc markup languages.
@@ -28,7 +28,7 @@ const (
)
// Version define the latest tagged release of this module.
-var Version = `0.15.4`
+var Version = `0.16.0`
// defExcludes define default files to be excludes on GoEmbed.
var defExcludes = []string{
@@ -37,6 +37,11 @@ var defExcludes = []string{
`^\..*`,
}
+// staticfs contains memory file system for "_static/" directory.
+// The value is initialized by running "go run ./internal/cmd/staticfs", that
+// generate "staticfs.go" file.
+var staticfs *memfs.MemFS
+
// Ciigo provides customizable and reusable instance of ciigo for embedding,
// converting, and/or serving HTTP server.
// This type is introduced so one can add HTTP handler or endpoint along