| Age | Commit message (Collapse) | Author |
|
To combine default stylesheet with custom CSS, set the value to "default"
and the file name of custom CSS, separated by comma.
This is the recommended way to use custom stylesheet since it can be set
only on specific pages.
----
// In asciidoctor:
:stylesheet: default, custom.css
// In markdown:
stylesheet: default, custom.css
----
To disable default stylesheet and only using custom CSS, set the value only
to the file name of custom CSS.
Another way to use custom stylesheet is by creating your own template and
pass it to `serve` or `convert` command.
This method makes the stylesheet applied to all pages.
|
|
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.
|
|
By default, the document contains ":stylesheet:" attribute, which
means using the default embedded CSS.
To disable it, unset the attribute using ":stylesheet!:".
To overwrite it, set the attribute to path of CSS file
":stylesheet: my.css".
|
|
|
|
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]
|
|
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 the first public API provided for Converter, as promised in the
previous commit.
|
|
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.
|
|
While at it, replace any use of ioutil with os/io package.
|
|
See https://kilabit.info/journal/2022/gpl/ for more information.
|
|
|
|
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.
|
|
This is to minimize recreating the fileHTML for the same fileMarkup,
and to simplify operation that require fileMarkup and fileHTML at the
same time.
|
|
Since the generate HTML already render the authors and date, there is
no need to save the values in the fileHTML.
Also, update the default embedded HTML template with latest format.
|
|
Changes,
ea961ec (HEAD -> main, origin/main) chore: increase the debug value to supress logs on DEBUG=1
6f33f2a README: change the format to markdown
d5502ca all: support all column style "a", "e", "h", "l", "m", "d", "s", "v"
f14e27f go.mod: update with latest share module
f1c0969 all: implement parser for table
4f24d95 all: support forcing line break by ending the line with " +\n"
18f26d6 all: change attributeClass from map to slice
43dfd5e all: support section "[discrete]" headings style
4a96e9e all: implement additional metadatas
aa9956d html_backend: check for meta "version-label" when generating footer
73255a6 all: support additional metadatas
02594b3 all: unpack the revision number, date, and remark into Revision
15ab720 all: add support for multiple authors with email
0d1a3e6 all: change the classes field from slice to map
d63f184 all: minimize number of short HTML templates
fa7fd13 all: add support for disable rendering title using "showtitle!"
7e3de28 all: add method ToEmbeddedHTML
1d89381 all: support meta "noheader"
e108779 all: parse the document subtitle
6429bf9 all: support setting document title through meta "doctitle"
842a827 all: fix linter warnings
3cbc0a0 all: minimize error checking by using bytes.Buffer
31c0a7d document_parser: remove unused return 'c'
ab98ae3 document_parser: minimize duplicate code when parsing paragraph
177f09b all: split between document and a document parser
54c1fa5 all: rewrite HTML backend template without text/template
|
|
|
|
|
|
|
|
If the date is zero ("0001-01-01 ...") reset it to empty string and
do not render it on HTML output.
|
|
The latest release of libasciidoc changes the API to convert adoc content
to HTML.
Instead of one call, we need to call ParseDocument first to get
the document metadata (Attributes) and then call Convert() to convert it
to HTML.
|
|
The parameter for template either in Convert or Generate functions or
in CLI now become pure optional, not default to "templates/html.tmpl"
anymore.
This will minimize steps for user to setup or run the library or program.
|
|
|
|
This is to make it consistent with fileHTML.
|
|
|
|
Due to the popularity of markdown format, we decide to support converting
markdown file in ciigo.
While at it ignore all files or directories that start with dot, which
are hidden file in unix-like system.
|
|
The update on libasciidoc affect the unpacking asciidoc metadata, which
change the attribute "doctitle" to "title".
|
|
One can use the map in template using the following syntax
{{ index .Metadata "key" }}
|
|
This first commit provide the following features,
* automatically regenerate asciidoc files on development,
* generate static and HTML files into Go source code, and
* running binary with embedded contents
|