Plan is a lightweight preprocessor and site generator
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Plan is a lightweight preprocessor and site generator.


  • Röda 0.12 or above
  • case bil
  • json bil


In case you'd wish not to use the Bilar system, please check the old commit 945eebdc4545b465af769358d876967130605ba8, which contains instructions for installing Plan manually.

The current version of plan should be installed using the Bilar system. The package for Plan can be downloaded from the releases section of this Github page.

bilar install plan.1.0.1.bil.tar.xz

To build the package locally, clone the repository and use Bilar to create an archive.

git clone
bilar compress plan
bilar install plan.1.0.1.bil.tar.xz


The Plan can be used either as a preprocessor or a site generator. The executable scripts plan.röd and siteplan.röd correspond to these usages.

As a preprocessor

From command line:

plan file

The script prints the resulting text to the standard output.

From another Röda script:

/* imports */
	plan := require("plan")

/* ... */

file_name := "my_page.plan"

variables := new map
variables["title"] = "My page"

plan.execPlan(file_name, variables)

As a site generator

The site can be generated using the following command:

siteplan [<pageclasses>]

This will generate the site according to the data/config.json file. You can optionally specify which page classes should be generated.

Example site: a blog

The directory structure should look something like this:

|-- build/
|   |-- posts/
|-- data/
|   |-- config.json
|   |-- posts.json
|-- templates/
|   |-- _post.plan


	"site_name": "Iikka's blog",
	"pageclasses": [
			"name": "Posts",
			"dir": "posts",
			"datafile": "posts.json",
			"templatefile": "_post.plan"


		"name": "the_first_post",
		"title": "The first post!",
		"author": "Iikka Hauhio",
		"date": "2016-12-13",
		"content": [
				"This is my very first blog post!",
				"Thank you for visiting my blog!"
				"See you soon :)"


	<title>|self.title| - |config.site_name|</title>
	|| - By: ||
	| for paragraph in self.content |
		<p>| for part in paragraph |
			| part |
		| end |</p>
	| end |
	<h2>Latest posts</h2>
	| for post in posts.last_5.reverse |
		<li><a href="|root post.path|">|post.title|</a></li>
	| end |