summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-05Release ciigo v0.2.0 (2020-07-05)v0.2.0Shulhan
* 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.
2020-06-27server: fix html template not being watched on changeShulhan
2020-06-27go.mod: update with latest share moduleShulhan
Fix a 404 when accessing URL with empty "index.html".
2020-06-05go.mod: update and fix dependencies error on fsnotifyShulhan
2020-05-07go.mod: update with latest share moduleShulhan
2020-05-07go.mod: update dependenciesShulhan
2020-05-07Makefile: add task to serve the generated exampleShulhan
2020-05-07template: update the embedded HTML footerShulhan
2020-05-07all: rename the "content" directory to "_example"Shulhan
While at it, also move the templates into _example and all assets into the same directory.
2020-05-01all: simplify serving content using function ServeShulhan
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().
2020-05-01all: move the file to generate static assets to internal/cmd/generateShulhan
2020-05-01all: embed the HTML template and the stylesheetShulhan
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.
2020-04-18Makefile: add release tasksShulhan
2020-03-30ciigo-example: update generated static.go fileShulhan
2020-03-30go.sum: cleaning upShulhan
2020-03-30go.mod: update share moduleShulhan
2020-03-25ciigo v0.1.1v0.1.1Shulhan
2020-03-25all: move the metadata keys as constantsShulhan
2020-03-24all: rename markupFile to fileMarkupShulhan
This is to make it consistent with fileHTML.
2020-03-16go.mod: update module "share"Shulhan
2020-03-16Revert "go.mod: update dependencies"Shulhan
This reverts commit 0412be09e95083ceb0fae3a578d1cfcd303a26a4. Reason for revert: latest update on libasciidoc break converting .adoc to .html file.
2020-02-14go.mod: update dependenciesShulhan
2020-02-14Makefile: add task to run linterShulhan
2020-02-14all: fix and suppress linter warningsShulhan
2020-02-14cmd/ciigo: remove redundant help flagsShulhan
2020-02-14ciigo: remove unused constant "defHTMLTemplate"Shulhan
2020-01-27go.mod: update dependenciesShulhan
2019-12-26go.mod: update required Go to 1.13 and upgrade some dependenciesShulhan
2019-09-30go.mod: update dependenciesShulhan
2019-09-27all: include the template file in generated Go codeShulhan
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.
2019-09-25content: fix and update documentationShulhan
2019-09-25all: implement search functionalityShulhan
The search function is available through internal API "/_internal/search" with single parameter "q" that contains one or more words to search.
2019-09-18go.mod: update dependenciesShulhan
2019-09-05go.mod: update libasciidoc and share with latest releaseShulhan
2019-08-14filehtml: unpack the author and date from document metadataShulhan
2019-08-14cmd/ciigo: a CLI to convert, generate, and serve markup filesShulhan
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".
2019-08-06cmd/ciigo: move to ciigo-exampleShulhan
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.
2019-08-05generate: compress the content of generated node with gzipShulhan
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.
2019-08-05server: add parameter to change the root directoryShulhan
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".
2019-08-05all: add support for markdown markup languageShulhan
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.
2019-05-24go.mod: update libasciidoc to latest in masterShulhan
This fixes some issues with formatting style inside backtick and link that is not get processed.
2019-05-19go.mod: update shuLhan/share to v20190517170056-d85106c3bdfdShulhan
* 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
2019-05-19Revert "go.mod: update dependencies"Shulhan
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
2019-05-19all: fix the main generate directive to use "+build ignore"Shulhan
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
2019-05-19go.mod: update dependenciesShulhan
2019-05-12go.mod: update to latest libasciidoc and shareShulhan
The update on libasciidoc affect the unpacking asciidoc metadata, which change the attribute "doctitle" to "title".
2019-05-11README: use "$HOME/go" as default base directoryShulhan
Following the tradition of default $GOPATH, the repositories should be created under "$HOME/go", not "$HOME/src".
2019-05-11go.mod: update dependenciesShulhan
2019-05-09filehtml: save other metadata as map of string to stringShulhan
One can use the map in template using the following syntax {{ index .Metadata "key" }}
2019-04-20content: update instruction on Getting StartedShulhan
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.