| Age | Commit message (Collapse) | Author |
|
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.
|
|
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]
|
|
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.
|
|
This is to provide the timestamp to each log output.
|
|
The ioutil has been deprecated since Go 1.19.
|
|
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.
|
|
The HTML template in the ServeOptions should not read when ciigo.Serve
running on non-development environment.
|
|
|
|
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.
|