Adam Bien's Weblog

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 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 (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.

NEW dates, new workshop: Java EE 7 Workshops: Bootstrap, Effective, Architectures, JavaScript Bootstrap and HTML 5 December, 7th-11th
NEW: Java EE 7 Testing-- Available For Streaming


A book about rethinking Java EE Patterns


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