div#myId // press TAB, then ENTER
ul.klasa>li*3>a{Item $}
Replace ALL
? :D
{{ product.title }}
{{ product.description }}
HTML open+close tag, if+endif, ugly...
Annoying include syntax, can't wrap content
object
s are filespackage
s are folderstrait
s are templates
object MyFile extends Renderable {
override def render: String = {
// arbitrary Scala code
"Some text..."
}
override def relPath: File = new File("my_file.txt")
}
Gets rendered to file: my_file.txt
.
Everything else is built upon this!
package site.pages
object MyPage extends ClassPackageRelativePath ...
Gets rendered to file: my-page.html
.
URL-friendly filename. Default extension is "html"
trait MySiteTemplate {
def footer: Frag = div("footer")
}
object MyPage extends MySiteTemplate {
override def footer = p(b("whatever"), "content...")
}
Simple, intuitive, reusable, tweakable...