M
M
MegaPuxapb2020-09-18 18:52:01
gulp.js
MegaPuxapb, 2020-09-18 18:52:01

gulp-file-include add class to html on import?

I import @@include('./template/_header.html')
on certain pages, I need to add the header class.
how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
igumenov, 2020-10-08
@MegaPuxapb

<!DOCTYPE html>
<html>
  <body>
  @@include('./view.html')
  @@include('./var.html', {
    "name": "haoxin",
    "age": 12345,
    "socials": {
      "fb": "facebook.com/include",
      "tw": "twitter.com/include"
    }
  })
  </body>
</html>

And so we deduce
<label>@@name</label>
<label>@@age</label>
<strong>@@socials.fb</strong>
<strong>@@socials.tw</strong>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question