Java 8 + Nashorn Scripting + Mustache = Static Page Generator

SPG is a Static Page Generator written in JavaScript as an executable script on top of Java 8. SPG comprises a single file, comes with a single JavaScript dependency (mustache.js) and only requires Java 8 installed on your system.

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.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License