diff --git a/example.kn b/example.kn
index f931911f0905afefa0b044f14bbd9d194ae69621..68b4a93605756688c72a32b75b1e4298af0187e7 100644
--- a/example.kn
+++ b/example.kn
@@ -2,17 +2,22 @@ # Lorem ipsum.
 
 Lorem ipsum dolor sit amet adipiscing.
 
-%k 2+2
+%%
+2+2
+%%
 
 Lorem ipsum dolor sit amet adipiscing.
 
-%k x:3+4;x
+%%
+x:3+4;x
+%%
 
 Lorem ipsum dolor sit amet adipiscing.
 
-%%k
+%%
 y:x-2
 z:x+2
 "x: ",$x,", y: ",$y,", z: ",$z
+%%
 
 Lorem ipsum dolor sit amet adipiscing.
diff --git a/index.kn b/index.kn
index 9e158aac56a5333f8948d8421f3bbb7981401049..04bc470d2ebc3867f0175160dd53180dfe26bc9b 100644
--- a/index.kn
+++ b/index.kn
@@ -1,3 +1,25 @@
-# There's nothing for you here!
+# Example kral capsule
+
+This capsule is powered by kral, a lightweight sort-of alternative to Jupyter Notebooks.
+
+Kráľomoc:
+
+* Exoplanet HAT-P-5b, a 'hot Jupiter' in the constellation of Lyra
+* An ancient Slovak term for the planet Jupiter
 
-This is just a placeholder page.
+=> example.kn Example notebook
+=> /git/kral View the kral Git repository
+
+kral exclusively uses the Gemini protocol and the K programming language.  When run as a CGI script, kral will parse .kn notebooks and evaluate embedded K code.  It then outputs Gemtext with the results embedded into the page.
+
+Gemini is a lightweight alternative to HTTP, but not quite as lightweight as Gopher.  But if you're viewing this, you probably already knew that.
+
+=> gemini://gemini.circumlunar.space The Gemini protocol
+
+K is an array-based programming language descended from APL.  Originally developed by computer scientist Arthur Whitney, it has found a niche in finance, but has traditionally remained closed-source and prohibitively expensive.  kral uses ngn/k, an open-source implementation of K6.
+
+=> https://codeberg.org/ngn/k ngn/k
+
+## But why?
+
+Partly to teach myself K, but mainly because it was fun.
diff --git a/kral.k b/kral.k
index 09130c6081709b654a56a109b10af22c32d5999f..d72be3e45ccf3f2aca24d670ca5f5d41112fbfdc 100755
--- a/kral.k
+++ b/kral.k
@@ -30,20 +30,37 @@ /wt1:{w[str[wtest1[x]]]}
 /wt2:{w[str[wtest2[x]]]}
 
 /get file
-d:`env[`"SCRIPT_PATH"] /if deployed via cgi
-/d:$[" "=*d;`env[`PWD];] /if testing offline
+d:`env[`"SCRIPT_PATH"]
+/d:$[" "=*d;`env[`PWD],"/";] /if testing offline
 d:"/"/|1_|"/"\d
 argv:"\/"\`env[`"PATH_INFO"]
-f:*argv
+f:*argv /if deployed via cgi
+/f:"example.kn" /if testing offline
 f:$[0=#f;"index.kn";f]
 p:.[{(,"20 text/gemini"),0:d,"/",f};0N;,"51 text/gemini"]
 
 /process document
-k:{(0 1)~x?"%k"}
-ki:&k'[p]
-in:.'3_'p[ki]
+/k:{(0 1)~x?"%k"}
+/ki:&k'[p]
+/in:.'3_'p[ki]
 put:{?[x;1+(y;y);,z]}
 out:{$[0=#y;x;o[put[x;*y;*z];1+1_y;1_z]]}
-p:out[p;ki;in]
-p[&{~`C=@x}@'p]:$p[&{~`C=@x}@'p]
+/p:out[p;ki;in]
+/p[&{~`C=@x}@'p]:$p[&{~`C=@x}@'p]
+
+/TODO: inline code
+
+/process cells
+cb:&{x~"%%"}'p
+$[~0=2!#cb;`err "unmatched%%";]
+cb:(_0.5*#cb;2)#cb
+ci:{(*x)+1_!-/|x}'cb
+r:{"  :> ",x}'str',//'{x[&~`u=@'x]}'.''p[ci]
+p[*'cb]:(#cb)#,"```K source code"
+p[*'|'cb]:(#cb)#,"```"
+p:out[p;*'|'cb;r]
+p:out[p;&{"  :> "~x[!5]}'p;(#&{"  :> "~x[!5]}'p)#,"```"]
+p:out[p;-1+&{"  :> "~x[!5]}'p;(#&{"  :> "~x[!5]}'p)#,"```K output"]
+p:out[p;&{x~"```K output"}'p;(#&{x~"```K output"}'p)#""]
+
 w[{x,"\r"}'[p]]
