Syntax Resource
Standard features
- Fuzzy paths:
<!-- @path cute-kittens.png -->
Result: ../images/cute-kittens.png
- Variables
- Assignment:
<!-- $myVar = Whoohoo! -->
- Output:
<!-- $myVar -->
Result: Whoohoo!
- Default output:
<!-- $fakeVar | No such variable! -->
Result: No such variable!
- TODO reminders:
<!-- @TODO: finish this code! -->
- Conditionals
- If:
<!-- @if $myVar -->It exists!<!-- @else -->No such variable<!-- @end if -->
Result: It exists!
- Unless:
<!-- @unless $fakeVar -->fakeVar isn't real<!-- @end unless -->
Result: fakeVar isn't real
- File imports:
<!-- @import _navigation -->
Result: (contents of the file named _navigation)
- Resource linking
- CSS:
<!-- @stylesheet css/styles -->
Result: <link rel='stylesheet' href='../css/styles.css'>
- JavaScript:
<!-- @javascript app -->
Result: <script src='../js/app.js'></script>
Mixins and generators
<!-- @iterate posts -->
<h2><!-- $title --></h2>
<div class="post"><!-- @contents --></div>
<!-- @end iterate -->