| Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
While at it, also move the templates into _example and all assets
into the same directory.
|
|
Previously to serve the generated content we call two fucntions:
NewServer() and Server.Start().
This changes unexported the internal server, and expose only the
Serve() function with the same parameter as NewServer().
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
The internal search template require the HTML generator to be initialized
with HTML template that provide when running "go generate". Without
the template, the internal search function will not work.
|
|
|
|
The search function is available through internal API "/_internal/search"
with single parameter "q" that contains one or more words to search.
|
|
|
|
Here are the usage of CLI,
ciigo [-template <file>] convert <dir>
Scan the "dir" recursively to find markup files (.adoc or .md) and
convert them into HTML files.
The template "file" is optional, default to "templates/html.tmpl" in
the current directory.
ciigo [-template <file>] [-out <file>] generate <dir>
Convert all markup files inside directory "dir" recursively and then
embed them into ".go" source file.
The output file is optional, default to "ciigo_static.go" in current
directory.
ciigo [-template <file>] [-address <ip:port>] serve <dir>
Serve all files inside directory "dir" using HTTP server, watch
changes on markup files and convert them to HTML files automatically.
If the address is not set, its default to ":8080".
|
|
The "cmd/ciigo-example" will be used to test and give an example of
how to build a binary that contains static, generated .go source file.
|
|
Previously the default root directory to be served by ciigo is
"content" directory inside the top directory.
This change allow ciigo to serve any directory pointed by first parameter
in NewServer(), and if its empty default to "content".
|
|
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
|