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


The simple static site generator

Orator is a static site generator written in Go. It is very fast, easy to use and flexible. Orator takes a directory with content and renders it to HTML with Go templates called "layouts".

Layouts and content files can include a yaml front matter that can be used in the content. Additionally, Orator reads site-specific variables from a config.yaml file. Variables defined there can be accessed in all layouts and content files.

Orator runs on any platform where the Go tool chain can run like Plan 9, Linux, Windows, Mac OS X and {DragonFly,Free,Open,Net}BSD.


First, make sure that you have Go installed.

Install Orator with the following command:

go get

Using Orator

The first thing you need to do is setting up the directory structure. An Orator website needs a config.yaml file that stores site-wide configuration and two directories: layouts for templates and content for your content.

Creating a layout

Read more about Go templates here.

A simple layout may look like this:


{{ define "head" }}
	<meta charset="utf-8">
	{{ $title := index .Page.FrontMatter "title" }}
	<title>{{ .SiteConfig.Title }}{{ if $title }} - {{ $title }}{{end}}</title>
{{ end }}

{{ define "header" }}
	<h1><a href="/">{{ .SiteConfig.Title }}</a></h1>
{{ end }}

{{ define "default" }}
<!DOCTYPE html>
{{ template "head" . }}
	{{ template "header" . }}
	{{ .Page.Content }}
{{ end }}

As you can see each file can contain multiple templates. They are all loaded anyway.


Site's assets are stores in the static directory. They are automatically copied in the root of the generated site's folder.

Creating content

Next up, we write some content for our site in the content directory. The directory layout here is preserved in the generated site.

Content can be in any format. If the file's name ends in .md, it will be rendered as markdown to html.

Content files can have a yaml front matter:

layout: default
special_thing: false

Hey this a site!

{{ if index .Page.FrontMatter "special_thing" }}
	<h1>Hidden header</h1>
{{ end }}

* [users](/users)

In the example above, the header will not be shown because the special_thing variable is set to false.

layout is a special variable that tells Orator what layout should this page use.

Generating the site

cd into the site folder and run ./orator. The final site will be generated in the gen directory.


Simple, fast, and flexible static site generator written in Go.






No releases published


No packages published