content in *.lit

Booklit documents are text files which invoke \functions to produce content or configure the current section.

Booklit makes it easy to reorganize and refactor your entire website without breaking links or manually adjusting header sizes.

\title{Hello}

Hello, world!

\testimonial{Jacques Berman Webster II}{
  It's lit!
}
plugins in *.go

Plugins are written in the Go programming language. Go is popular yet pretty boring, allowing you to focus on content while having plenty of libraries around when you need them.

Plugins allow documents to be expressive, providing meaningful syntax for repeated patterns and abstractions.

func (p MyPlugin) Testimonial(
  source, quote booklit.Content,
) booklit.Content {
  return booklit.Styled{
    Style: "testimonial",
    Content: quote,
    Partials: booklit.Partials{
      "Source": source,
    },
  }
}
presentation in *.tmpl

The HTML Renderer is powered by Go's prolific html/template package.

All templates can be overridden and different sections can be \styled, providing full control over presentation.

<blockquote class="testimonial">
  {{.Content | render}}

  <footer>
    {{.Partial "Source" | render}}
  </footer>
</blockquote>
build with booklit

booklit a single command for rendering content.

When an error occurs, Booklit will show the precise location of the error and suggest a fix (if possible).

$ booklit -i ./index.lit -o ./public/
INFO[0000] rendering
$ booklit -i ./to-err-is-human.lit
to-err-is-human.lit:5: unknown tag 'helo'

   5| Say \reference{helo}!
          ^^^^^^^^^^
These tags seem similar:

- hello

Did you mean one of these?
run with booklit -s $PORT

In server mode, content is generated on each request with only plugin changes requiring a server restart. The feedback loop is wicked fast.

If building the page fails, the error will be shown on the page instead, and be just as helpful.

$ booklit -i ./index.lit -s 3000
INFO[0000] listening

This website is written with Booklit. Want to write your own? Let's get started!