Open Ezra-Siton-UIX opened 7 years ago
I very much support this idea! As a beginner I have a hard time getting a basic example up and running!
I'm a bit unclear about your criticism of the current docs. Here's the full passage quoted (emphasis added):
You usually won't use renderString, instead you should write templates in individual files and use render. That way you can inherit and include templates. In this case, you need to tell nunjucks where these files live with the first argument of configure:
nunjucks.configure('views', { autoescape: true }); nunjucks.render('index.html', { foo: 'bar' });
That seems clear enough to me, but if you have a suggestion for how it could be improved I'd welcome a pull request.
There's no need to be rude. First of all, it isn't "my documentation." I'm the current maintainer of the project, but I didn't write the docs. And I did not say "I understand it, so it's fine." I did say that it seems clear to me. That doesn't mean it's fine, it just means that I'm not the best person to add whatever clarity is needed. Your bulleted list of questions that should be answered is helpful, and is more actionable than the original ticket, which focused on the sentence about renderString
vs render
Any updates on this?
The site docs are really deep / well structure - but it is very hard to find a simple/practical (html combine with template engine) example like (Template - data - output):
output:
<h1>Hello Frank!</h1>
In nunjucks docs I find simple example with this sentence "
You usually won't use renderString
" (Getting Started) - but why you don't add example of what I "usually should do" :) (codepen or any idea like this). This is really annoying.Examples for the first page example of docs (Simple and clear for new users without "won't")