philicevic / mix-html-builder

A quick laravel mix extension to build up html templates from partials and layouts.
MIT License
19 stars 8 forks source link

Include does not work after block in layout #17

Closed weblabio closed 3 years ago

weblabio commented 4 years ago

mix-html-builder: ^0.6.1 laravel-mix: ^5.0.1

home.html

<extends src="default.html">
    <block name="content">
        <h1>Welcome!</h1>
    </block>
</extends>

layouts/default.html

<include src="header.html"></include>

<block name="content" />

<include src="footer.html"></include>

partials/header.html

<header>HEADER</header>

partials/footer.html

<footer>FOOTER</header>

Problem: footer.html - not displayed if located after <block />

image

if moved to block:

<include src="header.html"></include>
<include src="footer.html"></include>

<block name="content" />

then the part is displayed: image

there are no errors in the console: image

weblabio commented 4 years ago

if you use a closing tag, then everything works

<block name="content"></block>

at least you need to fix the example in the documentation image