To avoid repetitive HTML code, GoPablo uses gulp-file-include. It has a simple templating synthax and allows to re-use chunks of code written in separate files. These partials are located in the directory:
src/includes/
Below you can find some examples how you can use imports.
<!DOCTYPE html>
<html>
<body>
@@include('./includes/view.html')
@@include('./includes/var.html', {
"name": "haoxin",
"age": 12345,
"socials": {
"fb": "facebook.com/johndoe",
"tw": "twitter.com/johndoe"
}
})
</body>
</html>
<h1>view</h1>
<label>@@name</label>
<label>@@age</label>
<strong>@@socials.fb</strong>
<strong>@@socials.tw</strong>
<!DOCTYPE html>
<html>
<body>
<h1>view</h1>
<label>haoxin</label>
<label>12345</label>
<strong>facebook.com/johndoe</strong>
<strong>twitter.com/johndoe</strong>
</body>
</html>