I thought all I have to do (according to docs on git hub) is to put {{#def.loadfile('/snippet.txt')}} into my template so it would look like this:
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Data</title>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
{{#def.loadfile('/views/includes/header.txt')}}
<section>
{{~it.arrOut:value:index}}
{{=value}}!
{{~}}
</section>
</body>
</html>
but it does not seem to be working. I even tried to import withdoT.js, but still nothing. All I get is "Internal Server Error", If you were able to make file includes work on dot.js can you please share your knowledge. I like this nifty engine, but docs for it are not as nifty.
I don't know if it apply to you, but on nodejs, using expressjs and express-dot.js, what I did was to define loadfile:
in app.js
in index.dot:
basically it adds loadfile as a function that take a path and output a string in the "def" object of dotjs.
You could certainly adapt and enhance this to your specific needs