Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

StaGen is the static site generator behind

StaGen is written in Java, and supports:

Read the tutorial.

Deliberately Minimalist (meaning: simple to learn!)

This static site generator was developed for maintaining a site like This is best suited for sites that have few pages generated out of few templates. We do not support themes or blog-like-static-pages. Of course, by nature of flexibility of StaGen, support for themes and blogs can be easily hacked into a StaGen site.

Read the tutorial to get started.


Prerequisite: Java 10.

Download the .zip or .tgz package from our releases section. Extract the content, and add to your PATH variable the bin folder. Once this is done, you will be able to execute stagen using the command stagen.

From the source


To build (requires Java 10, or above versions):

$ ./gradlew build

In the build directory you will find the build artifacts.


Encourage first-time visitors to read the tutorial. This will help in understanding the conventions used by StaGen.

In the command-prompt, to create a new template project structure (current direcory must be empty to create new project!):

$ stagen init

To build the project:

$ stagen gen

This command will generate the site under target directory.

To run the project using the embedded Jetty server:

$ stagen run

The run command also monitors project directory for changes, and builds automatically when a change is detected. Press Ctrl+C to quit.

To delete the target directory:

$ stagen clean

To view cli options:

$ stagen -h