| Age | Commit message (Collapse) | Author |
|
* all: simplify serving content using function Serve
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().
* all: embed the HTML template and the stylesheet
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.
|
|
|
|
Fix a 404 when accessing URL with empty "index.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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is to make it consistent with fileHTML.
|
|
|
|
This reverts commit 0412be09e95083ceb0fae3a578d1cfcd303a26a4.
Reason for revert: latest update on libasciidoc break converting .adoc
to .html file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
The new memfs library allow the content of generated .go source code
to be encoded (compressed) with gzip. This will minimize the size of
generated 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".
|
|
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.
|
|
This fixes some issues with formatting style inside backtick and link that
is not get processed.
|
|
* dns: set log flag to 0, without time prefix
* dns: add function to lookup PTR record by IP address
* dns: export Lookup method as part of Client interface
* http: print the not-found path on Server's getFSNode()
* add parameter to check Fully Qualified Domain Name on IsHostnameValid
* dns: substract the message TTL when the answer found on cache
* io: watch changes on sub of sub directories on DirWatcher
|
|
This reverts commit a232a665a45b420f415bcf9972551019c5e24539.
Seems like the latest commit on libasciidoc [1] cause some infite loop
when parsing and/or generating HTML file.
[1] https://github.com/bytesparadise/libasciidoc/commit/21f6c7f8cf662fbb93d114c446f7431c949edff1
|
|
The latest change on Go tip [1] somehow make the "go generate" with
"+build generate" on main package cause an error,
can't load package: package github.com/shuLhan/ciigo: found packages ciigo (ciigo.go) and main (generate_main.go) in /home/ms/go/src/github.com/shuLhan/ciigo
From the source code of Go itself, seems like the correct directive
is "+build ignore" instead of "+build generate".
[1] https://github.com/golang/go/issues/31920
|
|
|
|
The update on libasciidoc affect the unpacking asciidoc metadata, which
change the attribute "doctitle" to "title".
|
|
Following the tradition of default $GOPATH, the repositories should be
created under "$HOME/go", not "$HOME/src".
|
|
|
|
One can use the map in template using the following syntax
{{ index .Metadata "key" }}
|
|
Previous instruction assume that user will clone the repository and start
working from it. This will cause many import error due to user may
clone on different repository name.
The new instruction require user to setup new repository and import
the ciigo package to use it. This method is much flexible, give an
option to update the package as user wish.
|