| Age | Commit message (Collapse) | Author |
|
The foreground color changes to conform with color-contrast
ratio threshold, with score AAA. [1]
Add ARIA role to each section of pages: banner for topbar,
main for page, and contentinfo for footer.
This is to make the webpage more robust and functional no matter
what screen reader technology is used. [2]
For touch devices, increase the line height on Table of Contents.
This is to help users who may have difficulty in confidently targeting or
operating small controls. [3]
[1]: https://dequeuniversity.com/rules/axe/4.11/color-contrast
[2]: https://dequeuniversity.com/rules/axe/4.11/landmark-one-main
[3]: https://dequeuniversity.com/rules/axe/4.11/target-size
|
|
Instead of splitting the topbar into top-heading and menu,
breaking it down by class item.
|
|
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.
|
|
In development mode, where [ServeOptions.IsDevelopment] is set to true
or when running "ciigo serve", the ciigo HTTP server will check if the
new markup file is newer than HTML file when user press refresh or
reload on the browser.
If its newer, it will convert the markup file and return the new content
of HTML file.
|
|
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.
|
|
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.
|
|
|
|
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]
|
|
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.
|
|
Instead of using another template, use the embedded template when
generating HTML.
In this way we can see how the generated HTML looks like.
|
|
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.
|
|
Changes on the asciidoctor-go v0.4.1,
=== Bug fixes
* all: fix empty line printed on ToHTMLBody or ToHTMLEmbedded
* all: ignore parsing block image in paragraph
=== Enhancements
* all: handle empty preamble
|
|
When the test running we create directory testdata/watcher, create
a new file testdata/watcher/index.adoc and expect that the modify time
for testdata/watcher is changes.
Except that sometimes it is not. The modification time of directory
watcher before and after the file created most of times equal and this
cause the test wait indifinitely and fail.
This changes add 1 second delay before creating file inside directory
to make sure that the modification time changes.
|
|
The delay sometimes cause the test locked and hung.
|
|
|
|
Replace any usage of ":=" with explicit variable declaration for better
types clarity.
|
|
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.
|
|
While at it, replace any use of ioutil with os/io package.
|
|
See https://kilabit.info/journal/2022/gpl/ for more information.
|
|
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 affect the Watcher due to changes on FileState.
|
|
|
|
The ConvertOptions now has the Exclude field that can contains regular
expression. If the Exclude is not empty, it will be compiled and use
in Convert, Generate, Watch, and Serve; to ignore specific paths
being scanned.
|
|
Now that we have the watcher which task are to watch the asciidoc
files and template files, we can use it in server to minimize duplicate
code.
This changes refactoring the htmlGenerator to initialize the HTML
template from internal or memfs, so the caller did not need to check by
itself.
|
|
The Watch function, watch any changes on asciidoc files on directory
"dir" recursively and changes on the HTML template file.
If there is new or modified asciidoc files it will convert them into HTML
files using HTML template automatically.
If the HTML template file modified, it will re-convert all asciidoc files.
If the HTML template file deleted, it will replace them with internal,
default HTML template.
|