Hua (simplified Chinese for flower) is a simple, feature-rich, static content generator useful for maintaining blogs and web sites with templates. It was initially developed by Just Right UX as an in-house blogging tool, and has sufficiently matured for general blog and web site usage. Check out the Just Right UX blog to see an example of Hua in action.
Hua is written in the Ruby scripting language and was inspired in part by the venerable Perl-based blogging tool Blosxom and similar static content generators. Simplicity is one of its core principles: the database containing blog entries, the blog content, includes, and template files are maintained in plain text. Comments are provided through a through a third-party engine like Disqus or IntenseDebate. In keeping with the principle of simiplicity, Hua requires no external Ruby libraries, is small in size, and runs on any modern OS. Hua is open source software (MIT License) and its codebase is hosted on GitHub.
Hua requirements are minimal: It will run an any modern OS with a Ruby installation. Hua has been developed and tested on the following platforms:
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32]
ruby 2.3.6p384 (2017-12-14 revision 9808) [x86_64-cygwin]
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
Hua is hosted on GitHub, where you can clone or download the Git repository.
Hua is run from the command line by specifying the Hua script and config file. For example:
user@host: ~/Documents/hua ./hua.rb hua.cfg. An example site (config file, entries file, and content) is included in the distribution so you can try it out immediately.
The Hua config file specifies the locations of the support files and variables used by Hua (article meta info, output/content/include directories, URLs).
The entries file is a delimited plain-text database of articles. It can be edited with a text editor or a spreadsheet application (provided the plain-text format is preserved). Each line consists of the following fields:
Hua is normally silent, so if everything goes well nothing will be output on the command line. Errors will be output in the following situations:
output_dirand run Hua again.
--orphansas the second argument to list files in the
output_dirthat are not referenced in the
entries_file. If there are no orphans, nothing is output. Content is not processed in this mode.
Possible future enhancements include: