Hello, i learn vibe.d and crete simple blog.
I transfer to diet template array:
string[string] postData;
And try show post data, like example on this page:
http://vibed.org/docs
extends layout
block body
h1 Example page - Home: #{postData}
p Hello, World!
- foreach(i, post; postData)
| #{i}. #{post}
I get error:
[B71EFF80:00000000 INF] You are up to date
Compiling diet template 'index.dt' (compat)...
diet.d(285): Error: "template index.dt line 6: Indentations may
not skip child levels.(diet.d:304)"
diet.d(304): called from here:
this.assertp(nextindentlevel <= level + 1,"Indentations may not
skip child levels.","diet.d",304)
diet.d(345): called from here:
parser.buildBodyWriter(nodestack,level,instring)
diet.d(272): called from here:
this.buildBodyWriter(nodestack,nextindentlevel,instring)
diet.d(128): called from here: parser.buildWriter()
diet.d(76): called from here: dietParser()
diet.d(76): Error: argument to mixin must be a string, not
(dietParser())
diet.d(285): Error: "template index.dt line 6: Indentations may
not skip child levels.(diet.d:304)"
diet.d(304): called from here:
this.assertp(nextindentlevel <= level + 1,"Indentations may not
skip child levels.","diet.d",304)
diet.d(345): called from here:
parser.buildBodyWriter(nodestack,level,instring)
diet.d(272): called from here:
this.buildBodyWriter(nodestack,nextindentlevel,instring)
diet.d(128): called from here: parser.buildWriter()
diet.d(76): called from here: dietParser()
diet.d(76): Error: argument to mixin must be a string, not
(dietParser())
/opt/vibe/source/vibe/http/server.d(634): Error: template
instance
vibe.templ.diet.parseDietFileCompat!("index.dt",HttpServerRequest,"req",string[string],"postData")
error instantiating
source/app.d(32): instantiated from here:
renderCompat!("index.dt",HttpServerRequest,"req",string[string],"postData")
source/app.d(32): Error: template instance
vibe.http.server.HttpServerResponse.renderCompat!("index.dt",HttpServerRequest,"req",string[string],"postData")
error instantiating
Failed: 'dmd' '-debug' '-g' '-w' '-property' '-g'
'-I/opt/vibe/source' '-Isource' '-Jviews' '-Isource' '-Jviews'
'-L-levent_pthreads' '-L-levent' '-L-lssl' '-L-lcrypto' '-v'
'-o-' 'source/app.d' '-Isource'