Open msgilligan opened 12 years ago
Sorry about being so late to this.
This has actually come up several times, so I may as well look into it. :) So as to make such a plugin more useful for people: Could you give a bit of description regarding how it might be used? (I have never written a Gradle plugin before, but I suppose I must start somewhere…)
I'm not sure an actual plugin would be necessary (I haven't written one yet)-- maybe just a jar in a maven repo that could be easily included in a Gradle build.
I was looking at your plugin as a Groovy-based alternative to Jekyll to use to generate documentation for a GitHub project. There is an existing Gradle plugin (https://github.com/ajoberstar/gradle-git) that can be used to create/update a static GitHub pages site for a GitHub project (by committing generated files to the 'ghpages' branch)
You may also find that Gradle integration allows you to integrate with other site-generation tools - JavaScript processing, CSS processing, etc.
Good points, all. I will certainly look into this (from a sad combination of lack of experience Gradle-wise and lack of time I might take a while at it, though :( ). At any rate it is now one of the “must-get-to” issues here. Thanks!
If you guys want to look at my Liquibase plugin, it's a good template to follow for a moderately complex plugin. You could easily copy that in converting Rizzo.
@tlberglund Indeed! So it doth truly appear. :) Thanks for that.
You could also look at these two: https://github.com/eriwen/gradle-js-plugin and https://github.com/eriwen/gradle-css-plugin
I've started working on a similar Groovy static site generator. Rizzo was an inspiration but I went more of a 'plugin' route so both the templates and generation logic could be easily extended/customized. I'm currently grappling with the whole groovy script vs gradle plugin vs gvm integration vs other.
Since this discussion has already started here, I figured I'd ask: Is a Gradle plugin for site generation still a need or have people found another solution?
I think a Gradle plugin would be an essential part of a static site generator. It makes sense to leverage Gradle and its existing plugins and compact DSL. The other powerful tool that Gradle provides is the 'wrapper' -- which allows an entire JVM-based toolchain to install automatically when a build command is run (as long as Java itself is installed)
The static site generator could possibly make available a command-line tool and, in that case, I would look at GVM as the best way to install the tool. You might also want to take a look at Lazybones for providing templates to bootstrap a project.
But, I would start with the Gradle plugin to provide core functionality (and extensibility) and consider GVM and/or Lazybones add-ons as strictly optional.
p.s. I would also recommend considering Ratpack as a preview server. Several of the Node.js static site generators offer a live-preview mode and I personally would like to see this feature in a Groovy/Gradle-based static site generator.
I'm looking for something like this, but as a Gradle plugin. It would be great to see Rizzo running as a Gradle plugin.