lest

low entropy system for templating

NOTIFICATION

Lest is still work-in-progress (alpha version). While it's currently very usable and there are webpages made with Lest, some parts (dynamic and logic-less code) are not set in stone and are subject to change. You have been warned.

introduction

Lest is template engine / static site generator / server side system / whatever... with low entropy and high customization.

Lest removes unnecessary visual noise as < and > or end tags and uses rich, efficient and natural REN syntax to describe the document in beautiful and concise way.

Markdown syntax can be used in every string to boost productivity and change the paradigma.

Custom plugins can be added very easily and basic distribution includes plugin for advanced Bootstrap support.

installation

  1. Fork me on GitHub

    Download source from above or do it from command line with

    git clone https://github.com/rebolek/lest.git
  2. If you haven't got Rebol interpreter already, download it from here (half a megabyte, no installation) or compile it yourself from sources.

    • Start Rebol in Lest directory.
    • In the Rebol console, type do %lest.reb to run Lest.
    • Type lest [div "Hello world"] to test it.
    • If you see "<div>Hello world</div>", congratulations! Everything works and you're ready to take over the world.

documentation

  • introduction
  • simple templates
  • complex templates
  • bootstrap support
  • plugins

examples

simplified tags

div #id .class [span "content"]

img http://dummyimage.com/600x400/000/fff 300x200

ul #list
li "item 1"
li "item 2"
li "item 3"

user templates

reply: [div .reply-div [button "Reply"]]
p "Message #1"
reply
p "Message #2"
reply

reply: [div .reply-div [button "Reply"]]
msg: data string! [
	p data 
	reply
]
msg "Message #1"
msg "Message #2"

dynamic code

if lest-user? [
	span .wonderful "You have great taste!"
]

div either [now/time < 12:00] .am .pm "Hello!"

switch user-type [
	guest [page-info registration]
	user  [page-info user-panel]
	admin [page-info user-panel admin-panel]
]

markdown support

"[Markdown](http://daringfireball.net/projects/markdown/) `syntax` is **no problem**!!!"

bootstrap support

container [
	row .first-row [
		col 4 [h3 "left column"]
		col 4 [h3 "middle column"]
		col 4 [h3 "right column"]
	]
	row .second-row [
		col 4 offset 4 [h3 "middle column"]
	]
]