Zero Magic

by Patrik Duditš

Publishing Roq to Netlify

25 Feb 2026
Publishing Roq to Netlify
Photo by Ivan Diaz (unsplash)

This site is being served from Netlify. Until now, it has been just a bunch of static HTML files served from a Git repository.

The site now uses Roq, a static site generator built on Quarkus. I tried several static site generators over the years, but I never managed to get to a state that I would like: either it missed support for AsciiDoc, which I prefer for longer texts, or it used dreadful template language (shoutout to Go's text/template). Roq ticks all the boxes and is easily extensible because it builds on all the nice features of Quarkus.

However, Netlify isn't really a Java-oriented service but it's build image does include JDK, however there's no Maven installed. One also cannot install new software via apt.

Download Maven with Maven Wrapper

Thankfully any project scaffolded with Quarkus will contain Maven Wrapper. In case your roq installation came to life by other means, just run mvn wrapper:wrapper and commit resulting files. Wrapper will take care of downloading Maven on the build machine for you.

Netlify Build Settings

Next, navigate to your Netlify project under Project configuration > Build & Deploy:

Netlify configuration screen. Build mentioned below is set under in Build Settings

In section Build Settings set Build Command to:

QUARKUS_ROQ_GENERATOR_BATCH=true sh ./mvnw -B -q package quarkus:run

Same effect should be achieved with netlify.toml:

[build]
command = "QUARKUS_ROQ_GENERATOR_BATCH=true sh ./mvnw -B -q package quarkus:run"

Even the environment variable could be provided in saner way, but I didn't really try setting that up with the file.

Done

And that's it! Previews and deploy work like before, and there's even a build cache! While the first build took around 50 seconds, the next runs were 20 seconds faster, so I assume there were much fewer Maven downloads happening.