aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-07all: ignore error when scanning for file markupsShulhan
When listing the file markups, if the node is symlink (either file or directory) and target its not exist, continue to the next node instead of returning error. The same is true for directory that cannot be opened, probably due to broken symlink or permission.
2025-01-07all: refactoring to use [watchfs/v2]Shulhan
The [watchfs/v2] bring new enhancements that watching only single file instead of all markup files for changes. This minimize number of goroutine calling os.Stat on each markup files being watched on directory.
2024-12-08go.mod: update all dependenciesShulhan
2024-10-06Release ciigo v0.14.0 (2024-10-06)v0.14.0Shulhan
=== Breaking changes * all: refactoring functions to accept non pointer struct option The function that accept struct XxxOptions should only received the copy of struct, not pointer. === New features * all: introduce new type Ciigo The Ciigo type 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 with serving the files. === Enhancements * all: set margin on sectlevel3, sectlevel4, sectlevel5 Using default margin (1.25rem) cause the TOC for level 3 until 5 have wide gap in between them.
2024-10-06go.mod: update all dependenciesShulhan
2024-10-06all: refactoring functions to accept non pointer struct optionShulhan
The function that accept struct XxxOptions should only received the copy of struct, not pointer.
2024-09-28all: introduce new type CiigoShulhan
The Ciigo type 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 with serving the files.
2024-09-11all: set margin on sectlevel3, sectlevel4, sectlevel5Shulhan
Using default margin (1.25rem) cause the TOC for level 3 until 5 have wide gap in between them.
2024-09-07Release ciigo v0.13.2 (2024-09-07)v0.13.2Shulhan
Update on asciidoctor-go bring new features and enhancements, * Support document attribute "leveloffset". The ":leveloffset:" on document attribute allow increment or decrement the heading level on included files. Reference: https://docs.asciidoctor.org/asciidoc/latest/directives/include-with-leveloffset/ * Use strict document header format. Previously, an empty line before Document Title cause the parser stop parsing the document header, now an empty lines are skipped. Also document attribute can be place anywhere, either before or after title, and in between attributes; now it can be only placed after revision or author or title.
2024-09-07all: replace licensing format to "REUSE.toml"Shulhan
Using ".reuse/dep5" has been deprecated since REUSE v3.2.
2024-09-07go.mod: update all dependenciesShulhan
2024-08-18go.mod: update asciidoctor-go to the tipShulhan
2024-08-04Release ciigo v0.13.1 (2024-08-04)v0.13.1Shulhan
=== Bug fixes * Fix "serve" not detecting new files:: If there is new files on the root of directory it will not detected automatically. This release now fix this issue. === Others * all: remove Limitations and update Links The asciidoc-go library now support scanning symlink inside Root directory. The Links sections merge the previous contents from old index.adoc. * all: update the CLI usage in the README There are three places for command usage: one in main Go doc, one in the program usage, and one in README. If we changes the flags we need to update three of them, and sometimes we forgot. To simplify, we remove the one in the Go doc main program.
2024-08-04all: update the CLI usage in the READMEShulhan
There are three places for command usage: one in main Go doc, one in the program usage, and one in README. If we changes the flags we need to update three of them, and sometimes we forgot. To simplify, we remove the one in the Go doc main program.
2024-08-04all: remove Limitations and update LinksShulhan
The asciidoc-go library now support scanning symlink inside Root directory. The Links sections merge the previous contents from old index.adoc.
2024-08-04go.mod: update module pakakeh.go to v0.56.0Shulhan
2024-07-27_doc: replace index.adoc with README.mdShulhan
In this way, we can view how repository README looks like and remove duplication.
2024-07-26all: update dependenciesShulhan
Update on git.sr.ht/~shulhan/pakakeh.go fixes the "serve" command where new files on the root of served directory not detected automatically.
2024-06-28go.mod: update all dependenciesShulhan
2024-05-12Release ciigo v0.13.0 (2024-05-12)v0.13.0Shulhan
=== New features * cmd/ciigo: add flag to set package and variable name for "embed" The flag "-package-name" can be used to changes the default package name inside the Go embed file. The flag "-var-name" can be used to changes the default memfs variable name inside the Go embed file. === Enhancements * all: fix HTML files always generated when HTMLTemplate is not set If the path to HTMLTemplate option is not set, GoEmbed should convert to HTML only if markup file is newer than HTML file or when HTML file not exist. * all: initialize memfs using New When memfs not initialized using New, the [memfs.MemFS.PathNodes] will be nil. This cause any Get on new file will return 404.
2024-05-12_AUR: update PKGBUILD for testing makepkg in localShulhan
2024-05-12all: add and fix SPDX header on adoc filesShulhan
Putting SPDX headers at the bottom cause the "reuse lint" detect the file have no copyright and license information.
2024-05-12all: set the test output for GoEmbed without modification timeShulhan
This is to make the go embed output consistent when this repository cloned for the first time, due the file modtime is newer on each "git clone".
2024-05-12_example: fix SPDX header on template fileShulhan
The comment for HTML should end with "-->" not "--!>". While at it, set embedded Go file store the file without modification time to make the output (cmd/ciigo-example/static.go) does not changes on new clone.
2024-05-12all: initialize memfs using NewShulhan
When memfs not initialized using New, the [memfs.MemFS.PathNodes] will be nil. This cause any Get on new file will return 404.
2024-05-10all: update module pakakeh.go to latest releaseShulhan
2024-04-11cmd/ciigo: add flag to set package and variable name for "embed"Shulhan
The flag "-package-name" can be used to changes the default package name inside the Go embed file. The flag "-var-name" can be used to changes the default memfs variable name inside the Go embed file.
2024-04-11all: fix HTML files always generated when HTMLTemplate is not setShulhan
If the path to HTMLTemplate option is not set, GoEmbed should convert to HTML only if markup file is newer than HTML file or when HTML file not exist.
2024-04-10cmd/ciigo: instantiate variable on switch casesShulhan
Instead of creating variables on top of switch, only declare them when needed.
2024-04-04Release ciigo v0.12.0 (2024-04-04)v0.12.0Shulhan
=== New features * all: add server option to automatically generate index HTML 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. === Chores * all: replace module "share" with "pakakeh.go" The "share" module has been moved to new repository with new name at "https://sr.ht/~shulhan/pakakeh.go".
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-15go.mod: update module "pakakeh.go" to the tipShulhan
2024-03-15go.mod: update module "pakakeh.go" to tipShulhan
2024-03-05go.mod: update asciidoctor-go and goldmark modulesShulhan
2024-03-05all: replace module "share" with "pakakeh.go"Shulhan
2023-12-14Release ciigo v0.11.0 (2023-12-14)v0.11.0Shulhan
=== Breaking changes * Field [ConvertOptions.HtmlTemplate] become [ConvertOptions.HTMLTemplate] * Method [Converter.SetHtmlTemplateFile] become [Converter.SetHTMLTemplateFile] * Method [Converter.ToHtmlFile] become [Converter.ToHTMLFile] === Bug fix * asciidoc: fix custom ID on the first section not applied correctly
2023-12-13go.mod: update asciidoctor-go to tipShulhan
The latest changes on asciidoctor-go replace deprecated package "lib/parser" with [strings.Parser].
2023-12-10all: fix all warnings reported by linter reviveShulhan
Unfortunately, this breaks some API and exported fields, but its better than creating revive.toml file to add an exception. Some breaking changes, * Field [ConvertOptions.HtmlTemplate] become [ConvertOptions.HTMLTemplate] * Method [Converter.SetHtmlTemplateFile] become [Converter.SetHTMLTemplateFile] * Method [Converter.ToHtmlFile] become [Converter.ToHTMLFile]
2023-12-10go.mod: update all dependenciesShulhan
The update on asciidoctor-go fix the custom ID on the first section always being replaced.
2023-11-09Release ciigo v0.10.1 (2023-11-07)v0.10.1Shulhan
In this release, update on asciidoctor-go add new features to parse unordered list with '-' and some bug fixes related to rendering list. The update on share module fix for permission error when scanning using memfs and HTTP redirect for request to directory that does not end with slash. === Bug fixes all: ignore error permission when listing file markups:: Instead of returning the error, ignore it and continue processing other files in the list. === Enhancements all: print log message with log package:: This is to provide the timestamp to each log output. cmd/ciigo: set default IP address to loopback on serve command:: Previously, the default IP address is 0.0.0.0 which listen on all network interfaces. Listening to all network interface should be explicit by user. all: use modification time to force HTML conversion:: In this changes, we derive the decision based on modification time of HTML template and markup file. If the HTML template or markup file is newer that HTML file then the new HTML file will be generated.
2023-11-09all: simplify test for Watcher by using TempDirShulhan
By using TempDir we did not need to remove and create directory when the testing started. While at it, set the default DirWatcher delay to 100ms and decrease each "time.Sleep" duration on tests to make test finish faster.
2023-11-09all: update comment on newWatcherShulhan
2023-11-09all: add method to stop watcherShulhan
With the latest update on lib/memfs, we can stop the watcher internally.
2023-11-09go.mod: update share moduleShulhan
Changes, * lib/memfs: split handling deleted directory and file on DirWatcher * lib/memfs: stop all Watcher spawn by DirWatcher * lib/memfs: use second channel to stop goroutine in Watcher * lib/memfs: do not return when mode changes in Node Update * lib/memfs: remove embedding os.FileInfo and http.File * lib/memfs: remove mocking os.Stat * lib/memfs: refactoring, simplify DirWatcher logic * lib/memfs: add test for DirWatcher with symlink to file * email/dkim: set ExpiredAt to MaxInt64 if value is greater than 12 digits * lib/json: make CodeQL pass when converting unicode point
2023-11-09all: use modification time when deciding when to convert to HTMLShulhan
Previously, in changes 46bd8b68dc8c we pass the force=true to Convert function. In this changes, we derive the decision based on modification time of HTML template and markup file. If the HTML template or markup file is newer that HTML file then the new HTML file will be generated.
2023-11-07all: add comment to exported variable VersionShulhan
2023-11-07Makefile: replace linter golangci-lint with reviveShulhan
The reason for replacing is the golangci-lint become unusable. It does not provide any useful hints (either we become better at writing Go code or the default linter is not good enough). While at it, add another linters from golang.org/x/tools including fieldalignment and shadow.
2023-11-07cmd/ciigo: set default IP address to loopback on serve commandShulhan
Previously, the default IP address is 0.0.0.0 which listen on all network interfaces. Listening to all network interface should be explicit by user.
2023-11-07go.mod: update share module to v0.50.1Shulhan
This release bring many enhancements to "lib/memfs", a library for caching file system in memory. === Enhancements * lib/memfs: return nil in AddChild if file not exist * lib/memfs: quote the path in the returned error * lib/memfs: add method Child to Node * lib/memfs: call the Init method in the embedded file * lib/memfs: include empty directory * lib/memfs: re-scan directory content on Node’s Update
2023-10-14all: make "convert" to always forceShulhan
Previously, the convert command only check if the markup file is newer than the output file. If the template file updated, it will not re-convert the markup file. This changes fix this by always convert the markup files regarding their output modification times.