Slab is a text markup language created in 2024 by Võ Minh Thu.
#1442on PLDB | 0Years Old |
git clone https://github.com/hypered/slab
Slab is a programmable markup language that simplifies the creation of HTML. It combines concise notation with standard programming constructs to create reusable web content more efficiently.
frag page(titl)
doctype html
html
head
title= titl
body
h1= titl
content
let t = "My first Slab page"
page(t)
.main-content
p Welcome to Slab! This is a simple example of how Slab works.
Feature | Supported | Example | Token |
---|---|---|---|
hasForLoops | ✓ | ul for val, index in [1, 2] li val: #(val), index: #(index) | |
Conditionals | ✓ | if true p A. else p B. | |
Expressions | ✓ | let a = 1 p= a + 2 * 3 |