diff --git a/index.html b/index.html index 8f534ae..c2080fe 100644 --- a/index.html +++ b/index.html @@ -127,7 +127,32 @@

What about variable path parts?

What the heck is a *.spt file?

Aspen files are simplates - (*.spt), templates with a Python header.

+ (*.spt), templates with a Python header. Here's an + example:

+ +
import random
+
+[----]
+program = request.qs['program']
+excitement = "!" * random.randint(1, 10)
+
+[----] text/html via stdlib_format
+<h1>Greetings, {program}{excitement}</h1>
+
+[----] text/plain via stdlib_format
+Greetings, {program}{excitement}
+
+[----] application/json via json_dump
+{ "program": program
+, "excitement": excitement
+ }
+ + +