Skip to content

Commit

Permalink
Rough in additional simplates content
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Sep 7, 2016
1 parent 6732fbc commit a6a48d3
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,32 @@ <h2>What about variable path parts?</h2>
<h2>What the heck is a <code>*.spt</code> file?</h2>

<p>Aspen files are <a href="http://simplates.org/">simplates</a>
(<code>*.spt</code>), templates with a Python header.</p>
(<code>*.spt</code>), templates with a Python header. Here's an
example:</p>

<pre>import random

[----]
program = request.qs['program']
excitement = "!" * random.randint(1, 10)

[----] text/html via stdlib_format
&lt;h1&gt;Greetings, {program}{excitement}&lt;/h1&gt;

[----] text/plain via stdlib_format
Greetings, {program}{excitement}

[----] application/json via json_dump
{ "program": program
, "excitement": excitement
}</pre>


<ul>
<li><a href="https://github.com/gratipay/simplate.vim">Vim</a></li>
<li><a href="https://github.com/gratipay/simplates.emacs">Emacs</a></li>
<li><a href="https://github.com/Changaco/kate-highlightings/blob/master/simplate.xml">Kate</a></li>
</ul>

</section>

Expand Down

0 comments on commit a6a48d3

Please sign in to comment.