Open szexigexi opened 10 years ago
it would be nice to support yielding:
layout.kit
<!doctype html> <html> <head> <title>yield ftw</title> </head> <body> <!-- @yield --> </body> </html>
content.kit
<!-- @layout layout --> <p>content row 1</p> <p>content row 2</p> <p>content row 3</p>
result
<!doctype html> <html> <head> <title>yield ftw</title> </head> <body> <p>content row 1</p> <p>content row 2</p> <p>content row 3</p> </body> </html>
layout_extended.kit
<!doctype html> <html> <head> <title>yield ftw</title> </head> <body> <header> <!-- @yield header --> </header> <div class="content"> <!-- @yield main --> </div> </body> </html>
content_extended.kit
<!-- @layout layout_extended --> <!-- @content header --> <h1>title</h1> <p>subtitle</p> <!-- @content main --> <!-- @include content -->
(optionally we can close content sections with an )
<!doctype html> <html> <head> <title>yield ftw</title> </head> <body> <header> <h1>title</h1> <p>subtitle</p> </header> <div class="content"> <p>content row 1</p> <p>content row 2</p> <p>content row 3</p> </div> </body> </html>
or with resolved #3
+1
good idea. +1
+1 came here looking for this, I'm glad someone already addressed.
it would be nice to support yielding:
basic example
layout.kit
content.kit
result
a more flexible example
layout_extended.kit
content_extended.kit
(optionally we can close content sections with an )
result
or with resolved #3