A modern static build tool, powered by webpack

Get Started    Support
Ask A Question


Nested Blocks and locals in includes

Posted by Oliver Braun 11 months ago


two more questions:

  1. Is it possible to put a block inside a block?

    I tried something like this and it doesn't work:

       h1 Hello world!
       h1 Hello Olli!
  2. Is it possible to include something depending on a variable.

    I tried something like this and it doesn't work:

     include(src='includes/lectures/{{ name }}.sgr')

The background is the following:

I would like to generate my site https://ob.cs.hm.edu/ using spike.
Code can be found at https://github.com/obcode/ob.cs.hm.edu/tree/spike.
Some pages under /lecture have the same structure, but different content. I would like to use one
layout and "inject" the content. I can do it via locals, but some parts are larger than just one value.

Loading comments...