posthtml / posthtml-extend

Template extending (Jade-like)
MIT License
46 stars 9 forks source link

Update README examples with template literals #18

Closed durasj closed 6 years ago

durasj commented 6 years ago

Not sure if you count with some postprocessing of the JS, but with

var html = '<extends src="base.html">' +
               '<block name="title" type="prepend">How to use posthtml-extend</block>' +
               '<block name="content">Read the documentation</block>' +
               '<block name="footer" type="append">— 2016</block>'
           '</extends>';

Variable html won't contain the last line. I've unified the examples to use the template literals with spacing and stuff like in the example for plugins.

Scrum commented 6 years ago

@durasj Thanks! 👍