| Age | Commit message (Collapse) | Author |
|
=== 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.
|
|
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.
|
|
The asciidoc-go library now support scanning symlink inside Root
directory.
The Links sections merge the previous contents from old index.adoc.
|
|
|
|
In this way, we can view how repository README looks like and remove
duplication.
|
|
Update on git.sr.ht/~shulhan/pakakeh.go fixes the "serve" command where
new files on the root of served directory not detected automatically.
|
|
|
|
=== 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.
|
|
|
|
Putting SPDX headers at the bottom cause the "reuse lint" detect the file
have no copyright and license information.
|
|
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".
|
|
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.
|
|
When memfs not initialized using New, the [memfs.MemFS.PathNodes] will
be nil.
This cause any Get on new file will return 404.
|
|
|
|
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.
|
|
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.
|
|
Instead of creating variables on top of switch, only declare them when
needed.
|
|
=== 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".
|
|
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.
|
|
|
|
|
|
|
|
|
|
=== 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
|
|
The latest changes on asciidoctor-go replace deprecated package
"lib/parser" with [strings.Parser].
|
|
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]
|
|
The update on asciidoctor-go fix the custom ID on the first section
always being replaced.
|
|
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.
|
|
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.
|
|
|
|
With the latest update on lib/memfs, we can stop the watcher internally.
|
|
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
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
This is to provide the timestamp to each log output.
|
|
|
|
The ioutil has been deprecated since Go 1.19.
|
|
|
|
The asciidoctor-go add new features for unordered list with '-' and some
bug fixes related to rendering list.
The share module add fix for permission error when scanning using memfs
and HTTP redirect for request to directory that does not end with slash.
While at it, set the minimum Go version to 1.19.
|
|
For user that installed Go fonts [1] in their local or remote, using ciigo
will feels like home.
[1] https://go.dev/blog/go-fonts
|
|
This is to allow user to click the address in terminal that support
it.
|
|
Instead of returning the error, ignore it and continue processing other
files in the list.
|
|
=== New features
* all: bring back support for Markdown
I use two remote repositories: GitHub and SourceHut.
GitHub support rendering README using asciidoc while SourceHut not.
This cause the repository that use README.adoc rendered as text in
SourceHut which make the repository page less readable.
Also, the pkg.go.dev now render README but only support Markdown.
Since we cannot control the SourceHut and go.dev, the only option is
to support converting Markdown in ciigo so I can write README using
Markdown and the rest of documentation using Asciidoc.
|
|
|
|
This is to make it the repository page at git.sr.ht/~shulhan/ciigo
and pkg.go.dev readable.
|
|
Instead of using another template, use the embedded template when
generating HTML.
In this way we can see how the generated HTML looks like.
|