Java 8 + Nashorn Scripting + Mustache = 静态页面生成器
SPG 是一个静态页面生成器,采用JavaScript开发,作为一个在Java8上可执行的脚本。SPG只有一个文件,带一个JavaScript依赖 (mustache.js),并且只需要你的系统安装有 Java 8 。
SPG is simple: input.json + input.htm
(processed by https://github.com/janl/mustache.js template) => input.htm
(result).
SPG relies on mustache.js for rendering and therefore comes with support for sections, functions, conditional rendering etc.
SPG was created to maintain the registration pages for http://workshops.adam-bien.com (externalize the dates, show badges like "registration closed"), so it is heavily used in production :-).
You will find sources at github. SPG is open source and Apache 2 licensed.
See you at Java EE Workshops at MUC Airport. SPG is going to be discussed during the Java EE 7 + HTML 5 workshop.