| Age | Commit message (Collapse) | Author |
|
=== Bug fixes
* all: remove delay for testing Watch.
The delay sometimes cause the test locked and hung.
* all: fix HTML template loaded during Serve on non-development
The HTML template in the ServeOptions should not read when ciigo.Serve
running on non-development environment.
|
|
The delay sometimes cause the test locked and hung.
|
|
The HTML template in the ServeOptions should not read when ciigo.Serve
running on non-development environment.
|
|
=== New features
* all: export internal htmlGenerator as Converter
=== Chores
* all: add package build for Arch Linux
* all: set the Version automatically set during build
* all: convert the README using AsciiDoc
* all: merge internal/cmd/goembed to cmd/ciigo-example
|
|
|
|
This require that the command build or install using "make build/install".
|
|
While at it, create symlink README so the git.sr.ht site can display it.
|
|
|
|
|
|
Instead of separating different build directory for OS, use single
_bin directory.
If we want to build for different OS/arch, can set the GOOS and GOARCH
environment variables before running make.
|
|
The internal/cmd/goembed is replaced as command "embed" of
cmd/ciigo-example.
|
|
Replace any usage of ":=" with explicit variable declaration for better
types clarity.
|
|
The SetHtmlTemplateFile set or changes the HTML template used by
Converter to convert AsciiDoc to HTML.
|
|
This is the first public API provided for Converter, as promised in the
previous commit.
|
|
The purpose of Converter is to provide a single, reusable converter
for AsciiDoc file or content.
|
|
The latest update on asciidoctor-go refactor the generated ref ID where
ref ID is no longer prefixed with "\_" if start with ASCII letter.
=== Enhancements
* all: generate HTML meta data and replace the top header title
The following metadata are rendered based on the same asciidoc
attributes: author, description, generator, and keywords.
* all: add CSS for admonition block
* all: update CSS for description list
|
|
The following metadata are rendered based on the same asciidoc
attributes: author, description, generator, and keywords.
This changes also replace the topbar title with the document title,
cleanup the HTML header syntax by replacing "/>" with ">", trim leading
and trailing spaces on Body and embedded CSS.
|
|
|
|
The style only applicable for non-icon admonition.
|
|
This changes update the embedded Go file on cmd/ciigo-example and
rename field Development on MemFS Options.
|
|
Set the list title font weight to be bold and remove the font-size for
list description to make the font-size consistent.
|
|
== Bug fixes
* all: check for excluded file before processing sub directory
== Enhancements
* cmd/ciigo: simplify and cleaning up the code
* cmd/ciigo: add command to print to current version
* all: include the path that cause an error on newHTMLGenerator
== Chores
* all: reformat all files using latest goimports
* all: update the watcher affected by changes on share module
|
|
This changes move the flag "help" to command.
|
|
|
|
While at it, replace any use of ioutil with os/io package.
|
|
|
|
|
|
|
|
|
|
In case the newHTMLGenerator return an error, it's hard to track which
part of code that cause the error because there are three files being
processed (the index HTML, HTML template, or internal template).
This changes include the file that cause an error inside the error
message.
|
|
This also fix the share module using "replace" instead of "require".
|
|
Previously, if the file path match with one of the excluded pattern,
we keep processing the sub directory to find the markup files.
This may cause an error "too many open files" if excluded directory
contains many sub directory and/or files.
This changes fix this issue by checking the path with excluded pattern
first before diving into sub directory.
|
|
While at it, remove the SPDX comment at the top README to fix the
markdown not rendered correctly.
|
|
Github and pkg.go.dev cannot handle symbolic link of COPYING file
on the root, but the "reuse lint" command can handle it.
So, we make a copy of license to COPYING and under LICENSES directoy
we create symbolic link to ../COPYING.
|
|
In the share module, the DirWatcher and Watcher has been moved to package
memfs and the way to consumed the changes is not through callback
again but through channel.
|
|
09ab0af all: re-convert markup files if HTML template is newer on GoEmbed
753642c all: add 1em to the bottom margin of paragraph under list
0d59995 all: update asciidoctor-go and share modules to latest version
88478fd all: re-licensing ciigo under GPL-3.0 or later
a6c335c go.mod: update share module to the tip
61fa9a7 all: realign all structs
fdc5579 all: fix adoc files not re-converted when template file changes
41117b4 all: add option IsDevelopment to ServeOptions
42e9c24 go.mod: update module asciidoctor-go to the tip
ce2af85 Makefile: set CGO_ENABLED to 1 when running test
|
|
Calling GoEmbed with updated HTML template will reconvert all markup
files automatically, as long as the generated Go file is older than
the HTML template file.
|
|
This is to make the list content readable and indistinguishable,
especially when we have many list items with paragraphs.
|
|
|
|
See https://kilabit.info/journal/2022/gpl/ for more information.
|
|
|
|
Changes,
* fileMarkup: realign from 56 to 48 bytes (-8 bytes)
* htmlGenerator: realign from 32 to 24 bytes (-8 bytes)
* watcher: realign from 48 to 40 bytes (-8 bytes)
|
|
In commit 06d03f6afe37 we skip converting files if the generated HTML
is newer than adoc file.
This cause an issue where the template file changes during Watch or
Serve, but the HTML files is not regenerated.
|
|
If the IsDevelopment option set to true, the serve function will serve
the root directory directly and watch all asciidoc files for changes
and convert it.
This is like running Watch, Convert and Serve at the same time.
|
|
The latest tip fix rendering list check box text that get cut one
character in the beginning.
|
|
Never assume that the user set CGO_ENABLED to 1 by default.
|
|
This release update all dependencies and codes affected by updated.
|
|
|
|
|
|
Changes on asciidoctor-go,
* all: fix parsing and rendering cross reference
* all: allow colon ':' and period '.' on the ID
=== Breaking changes
* all: refactoring with latest share module
The latest 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"
=== Bug fixes
* all: add missing new line when printing file to be converted
* all: fix empty fileMarkups on watcher
Previously, when user call ciigo.Watch(), and the markup file changes,
the onChangeFileMarkup method will print an error "xyz not found" which
cause the markup file not converted.
This is caused by watcher.fileMarkups is empty.
This changes fix this issue by initializing the fileMarkups field using
listFileMarkups, so the next callback to onChangeFileMarkup can detect
the changed file and convert it.
* This update fix HTTP server caching using ETag.
=== Enhancements
* all: check markup modification time before converting to HTML
Previously, when the Convert, Watch or Serve running it will convert
all markup files into HTML without checking if the adoc has been modified
or newer than HTML file.
This changes check the modification time of markup file first before
converting them, to minimize unnecessary operation.
|