Answer the question
In order to leave comments, you need to log in
HTML template engine for beginners: how to take the first steps?
Good afternoon, I'm interested in a step-by-step instruction for a teapot.
Yes: mac osx, installed in the Node console (for example) + nunjacks (seemed good for a start)
Task: I would like to have pieces of templates in my folders, and with the help of one or another template engine (the simplest one, I really need ikludes + variables) get the resulting compiled html file. When editing pieces - autocompilation of the resulting file.
Unfortunately, all I find on the net is stupidly inserting the js version of the template engine and building it on the fly in the browser - this does not suit me.
I'm with the console on "you" and have no idea how to use and where to start.
Can you help me write step by step with simple steps - how to make a couple of pieces of a template and accumulate them into 1 on a poppy osx?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Understand Gulp
gulpjs.com
Then I recommend taking Jade as a templating engine
https://www.npmjs.com/package/gulp-jade
jade-lang.com
Or Handlebars
handlebarsjs.com
You can take something prepared
https://github.com/tars/tars
https://github.com/CSSSR/csssr-project-template
but it seems to me that it will be more difficult to figure out such a combine right away.
of all that Andrey Khokhlov suggested to Jade, I use the thing, but without it, I do it faster, but the best html preprocessor is php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question