diff options
| author | Shulhan <m.shulhan@gmail.com> | 2021-03-18 03:17:19 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2021-03-18 03:17:19 +0700 |
| commit | c649be84743593a5e3b8a7bbecf92a0fd0b003dd (patch) | |
| tree | 17b5e8a9976c6639a4a026f6ff7e2b3c30fdfde4 | |
| parent | e7286f763ac7974bb24d7362e5b84e3252279646 (diff) | |
| download | golang-id-web-c649be84743593a5e3b8a7bbecf92a0fd0b003dd.tar.xz | |
all: pindahkan HTML template ke dalam direktori _content
Sekarang ciigo tidak perlu lagi memisahkan direktori antara template dan
dokumen asciidoc.
| -rw-r--r-- | _content/berkontribusi.adoc | 2 | ||||
| -rw-r--r-- | _content/html.tmpl (renamed from _templates/html.tmpl) | 0 | ||||
| -rw-r--r-- | cmd/www-golangid/main.go | 2 | ||||
| -rw-r--r-- | generate.go | 2 |
4 files changed, 3 insertions, 3 deletions
diff --git a/_content/berkontribusi.adoc b/_content/berkontribusi.adoc index 2077601..9493f63 100644 --- a/_content/berkontribusi.adoc +++ b/_content/berkontribusi.adoc @@ -82,7 +82,7 @@ https://sr.ht/~shulhan/ciigo[kerangkanya]: * `+_content/assets+`: direktori yang menyimpan berkas statis, seperti _stylesheet_. -* `+_templates/html.tmpl+`: berisi template yang membungkus hasil HTML dari +* `+_content/html.tmpl+`: berisi template yang membungkus hasil HTML dari berkas asciidoc. Sebaiknya berkas ini tidak diubah dahulu, kecuali anda tahu yang anda lakukan. diff --git a/_templates/html.tmpl b/_content/html.tmpl index 4ab5989..4ab5989 100644 --- a/_templates/html.tmpl +++ b/_content/html.tmpl diff --git a/cmd/www-golangid/main.go b/cmd/www-golangid/main.go index 9afc042..7c7d779 100644 --- a/cmd/www-golangid/main.go +++ b/cmd/www-golangid/main.go @@ -19,5 +19,5 @@ func main() { flag.StringVar(&port, "port", "5000", "HTTP port server") flag.Parse() - ciigo.Serve(memFS, "./_content", ":"+port, "./_templates/html.tmpl") + ciigo.Serve(memFS, "./_content", ":"+port, "_content/html.tmpl") } diff --git a/generate.go b/generate.go index c2b9e96..bd87b32 100644 --- a/generate.go +++ b/generate.go @@ -13,7 +13,7 @@ import ( func main() { opts := &ciigo.GenerateOptions{ Root: "_content", - HTMLTemplate: "./_templates/html.tmpl", + HTMLTemplate: "_content/html.tmpl", GenPackageName: "main", GenVarName: "memFS", GenGoFileName: "cmd/www-golangid/static.go", |
