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


NEW workshop: Building HTML 5 Applications With Angular 2
Full week in December 2016: from Java EE 7 Bootstrap, Effective, Architectures over Testing to Microservices
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.

Newsletter: airhacksnews.com

A book about rethinking Java EE Patterns

Comments:

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