| Age | Commit message (Collapse) | Author |
|
**🌱 cmd/ciigo: add option to set base path and shutdown idle duration**
The `-base-path` option set the URL prefix for serving HTTP request.
This allow serving the content under the prefix other than "/".
The `-shutdown-idle` option set the duration when server will stop accepting
new connections and shutting down.
This option can be helpful to reduce the resources on local environment.
**🌼 all: make the anchor symbol position on the right side of headers**
Previously, when `:sectanchors:` is set, the default anchor symbol
position is absolute on the left side of heading text with block display
option (the symbol located outside of box area of headers).
In special case, this cause an overflow when the generated HTML are
rendered inside flex with fixed height (the body is scrollable with empty
content on bottom).
This module changes the anchor symbol position to the right side of
heading text to prevent scroll on such layout, without absolute position
and normal inline layout.
|
|
This set the minimum Go version to 1.26.0.
|
|
The fix for anchor position has been updated in asciidoctor-go,
so lets remove the quick fix in here.
|
|
Previously, when `:sectanchors:` is set, the default anchor symbol
position is absolute on the left side of heading text with block display
option (the symbol located outside of box area of headers).
In special case, this cause an overflow when the generated HTML are
rendered inside flex with fixed height (the body is scrollable with empty
content on bottom).
This module changes the anchor symbol position to the right side of
heading text to prevent scroll on such layout, without absolute position
and normal inline layout.
|
|
The `-base-path` option set the URL prefix for serving HTTP request.
This allow serving the content under the prefix other than "/".
The `-shutdown-idle` option set the duration when server will stop
accepting new connections and shutting down.
This option can be helpful to reduce the resources on local environment.
|
|
**🌱 all: embed CSS and index HTML template using memfs**
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.
**🌼 all: improve the default stylesheet and template**
Add common styles for asciidoctor elements with dark theme.
Common styles including title, header, anchor, lists, table, and footer.
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]
In the default template, instead of splitting the topbar into top-heading
and menu, breaking it down by class item.
[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
**🌱 all: allow combination of default and custom stylesheet**
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.
**🌼 all: add field Listener to ServeOptions**
The field Listener allow passing [net.Listener] instance for accepting
HTTP connection.
One of the use case is to activate the ciigo serve using systemd.socket(5).
**🌱 all: redirect request for .adoc or .md to the HTML file**
During serve, onGet method, if the node does not exist and the request
path end with .adoc or .md, redirect the client to the .html location
with status 303 (See Other).
**🪵 all: embed struct [lib/http.ServerOptions] directly to [ServeOptions]**
At this point, all of the fields in the struct ServeOptions is the
same with [lib/http.ServerOptions] except IsDevelopment and
ConvertOptions.
For field IsDevelopment we keep in the struct.
For field ConvertOptions we remove it and let the caller pass it on
Serve function or InitHTTPServer method.
|
|
This update affect the test on onGet, where request to directory that
does not end with slash will be redirected with status code 301 (Moved
Permanently) instead of 302 (Found).
|
|
At this point, all of the fields in the struct ServeOptions is the
same with [lib/http.ServerOptions] except IsDevelopment and
ConvertOptions.
For field IsDevelopment we keep in the struct.
For field ConvertOptions we remove it and let the caller pass it on
Serve function or InitHTTPServer method.
|
|
This allow request for .adoc/.md get redirected to .html in production
environment, as we have in https://golang-id.org/proposal/ .
|
|
During serve, onGet method, if the node does not exist and the request
path end with .adoc or .md, redirect the client to the .html location
with status 303 (StatusSeeOther).
|
|
Changes,
* Set the anchor text-decoration back to none but with hover set to
underline
* Set only h2 to have border bottom
* Increase top margin for headings
* Set the topbar layout using flex and remove margin and padding for
form elements
* Change the sectanchor indicator to display on hover.
Minimize unncessary text displayed on screen.
* Add style for block quotes
|
|
The field Listener allow passing [net.Listener] instance for accepting
HTTP connection.
One of the use case is to activate the ciigo serve using systemd.socket(5).
|
|
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.
|
|
The content is the same with adoc one, with style updated to use
basic and [extended] syntax.
Many syntax are not worked, like tables and admonition.
[extended]: https://www.markdownguide.org/extended-syntax/
|
|
In the header, we made the authors, version, date, remark to be italic.
In the ToC, we show the "Table of Contents" title back, re-align it to
match with the top and bottom elements.
|
|
While at it, add padding bottom to the #footnotes in HTML generated by
asciidoctor-go.
|
|
On HTML output of markdown, there is no .container #header and #content
so the page content will not get centered (using margin).
To fix this, we set the margin auto on .container class and use the
default background on #footer.
|
|
Seems like we use "find ... -delete" for a reason that I forgot.
It should not be like that, we will fix it later.
|
|
Changes,
* all: add aria-label to the anchor when sectanchor enabled
* all: update default CSS to asciidoctor v2.0.26
* all: use separate file with go:embed for default CSS
* all: reformat README with prettier and simplify license
|
|
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
|
|
* Reordering the styles based on the HTML layout.
* Changes the background color for verbatim and source code
* Add background color to footer
* Set the topbar and footer width to full
|
|
Instead of splitting the topbar into top-heading and menu,
breaking it down by class item.
|
|
Add common styles for asciidoctor elements with dark theme.
Common styles including title, header, anchor, lists, table, and footer.
|
|
This allow us to inspect the example using the serve-doc task,
along with the content of _doc/.
|
|
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.
|
|
While at it, simplify the license text to reference only the
license name instead of snippet.
|
|
This update have changes on [lib/http.FSHandler] that return second
parameter, status code.
|
|
This is the last release for year 2025.
In the README, we fix broken "Change log" link when rendered on pkg.go.dev
and sr.ht sites.
The go.mod has been updated to use minimum Go 1.24.0; and all dependencies
has been updated to latest release.
Happy holidays!
|
|
|
|
|
|
|
|
The [Change log] link is broken when rendered on pkg.go.dev and sr.ht
sites.
|
|
This release update the core asciidoctor-go module that brings several new
features.
[NEW FEATURE] **Support include directive inside block code.**
Example of block code with include directive,
----
...
include::file[]
...
----
[NEW FEATURE] **Support document attribute "docdir".**
The "docdir" attribute contains the full path of the directory that
contains the source document.
By default it is set to the directory where the Document resided.
[NEW FEATURE] **Add default HTML stylesheet**.
The generated HTML now contains the default stylesheet.
The stylesheet is copied from HTML file generated by Asciidoctor
v2.0.23.
|
|
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".
|
|
The "generator" meta will changes when the asciidoctor-go release new
version.
This causes unnecessary chores on test data that needs to be updated
on every new releases.
|
|
|
|
|
|
[BUG FIX]
Fix section detected as paragraph after list and comment.
Previously, given the following markup,
----
* Sub list
+
Sub list content.
//}}}
//{{{
== Sub 2
//}}
----
The section "Sub 2" will be parsed as paragraph instead of new section.
[CHORE]
In the linter, we replace the fieldalignment and shadow using our internal
gocheck command.
This linters actually have an API that can be combined into a program,
which provided by package "pakakeh.go/lib/goanalysis".
|
|
The environment variable GOBIN may not set by user explicitly.
|
|
The fieldalignment and shadow is linter from golang.org/x/tools.
This linters actually have an API that can be combined into a program,
which provided by package "pakakeh.go/lib/goanalysis".
|
|
The latest release fix parsing section that is not detected after list
items.
|
|
This is the first major release of ciigo on the new year of 2025.
We bring many enhancements and update on the documentation.
[ENHANCEMENT]
The first changes is refactoring to use watchfs/v2. The [watchfs/v2]
bring new enhancements by watching only single file instead of all
markup files for changes. This minimize number of goroutine calling
[os.Stat] on each markup files.
[BUG FIX]
When listing the file markups, if the node is symlink (either file or
directory) and target its not exist, continue to the next node instead
of returning error. The same is true for directory that cannot be
opened, probably due to broken symlink or permission.
[ENHANCEMENT]
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.
This allow quick preview without waiting for watcher to complete.
[ENHANCEMENT]
The README has been revamped to include section on how to install ciigo
as program, how to running ciigo convert and serve, how to write content
and view it live on browser, and how to deploy it.
On the section "ciigo as library" we point the user the sample code at
"internal/cmd/ciigo-example" instead of writing long code at the front.
[BUG FIX]
This release also fix Exclude option does not get processed when calling
GoEmbed, or running "ciigo embed".
|
|
Instead of writing the code manually, show the where to look for
example, which is at "internal/cmd/ciigo-example".
|
|
|
|
While at it, update the example index by removing unnecessary
external image, and update links to open in new tab/window.
|
|
In the README we add list of ciigo features, describe how to install
ciigo, reformat the Usage, add an example of running ciigo convert
and serve, how to write content and view it live on browser, and
how to deploy it using rsync.
|
|
Converting extension to lowercase before trimming it may not remove
the extension itself since the string has changes.
|
|
Using port 8080 as the default address for "serve" is too common and may
conflict with other services in user local environment.
While at it, also change the "serve-doc" with other random ports to
allow us test running "ciigo serve" and viewing doc at the same time.
|
|
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.
|
|
Task for "lint" and "build" is much more faster than "test".
So if we lint or build failed, we did not waste too much times waiting
for all tests to pass.
While at it, remove linter "revive" we will use the standard linters
from Go tools itself.
|