aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd
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-01-24all: embed CSS and index HTML template using memfsShulhan
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.
2025-12-27all: update missing licenses and copyright informationShulhan
2025-02-01all: replace external linters with internal linterShulhan
The fieldalignment and shadow is linter from golang.org/x/tools. This linters actually have an API that can be combined into a program, which provided by package "pakakeh.go/lib/goanalysis".
2025-01-07all: move example for ciigo as library to internal/cmd/ciigo-exampleShulhan
While at it, update the example index by removing unnecessary external image, and update links to open in new tab/window.
2022-08-01all: merge internal/cmd/goembed to cmd/ciigo-exampleShulhan
The internal/cmd/goembed is replaced as command "embed" of cmd/ciigo-example.
2022-08-01all: clean up codesShulhan
Replace any usage of ":=" with explicit variable declaration for better types clarity.
2022-03-04all: re-licensing ciigo under GPL-3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2021-10-27all: update to latest share moduleShulhan
The latest share module simplify the memfs.GoEmbed call by using struct memfs.EmbedOptions instead of passing it as parameters. The changes on share module affect on how EmbedOptions in this module, where memfs.EmbedOptions is used to replace field PackageName, VarName, and GoFileName.
2021-10-10all: refactoring with latest share moduleShulhan
The lates share module use the term GoEmbed to generate Go source file. In order for this repo in sync with upstream terminology and to minimize confusion, we changes the exported function and command name from "generate" to "embed", this includes * Command "ciigo generate" become "ciigo embed" * Exported function to generate Go renamed from "Generate" to "GoEmbed". This include the parameter GenerateOptions which renamed to EmbedOptions. * The internal command to generate example renamed from "generate" to "goembed"
2021-04-03all: change the Convert function to use type ConvertOptionsShulhan
Previously, we pass the directory to be scanned for asciidoc markup files and path to HTML template on Convert function. Adding new option to Convert will cause changes on the Convert signature. To prevent this, we changes the Convert signature from multiple parameters into single parameter ConvertOptions. While at it, change the variable name HTMLTemplate to HtmlTemplate.
2021-02-21all: return error instead of call log.Fatal on non main packagesShulhan
The library, non-main packages, should never call Fatal or panic, its up to the main package or the caller on how to handle it. While at it, fix the returned error to use log prefix and the error value, remove the "ciigo: " prefix.
2021-01-10all: refactoring due to change on memfs packageShulhan
This changes affect exported function Generate and Serve. Previously, the Generate() function accept three options: dir, out, and htmlTemplate; this commit changes the parameter into single struct Options with two additional options: GenPackageName and GenVarName. The GenPackageName allow to set the package name in Go generate source code, default to "main" if not set. The GenVarName set the instance of memfs.MemFS where the embedded files will be stored. On the Serve() function, we add parameter to pass the instance of memfs.MemFS (the one that passed on GenVarName).
2020-11-11all: migrate the repo and Go module to git.sr.ht/~shulhan/ciigoShulhan
2020-05-07all: rename the "content" directory to "_example"Shulhan
While at it, also move the templates into _example and all assets into the same directory.
2020-05-01all: move the file to generate static assets to internal/cmd/generateShulhan