using System.Collections.Generic;
public static void Main()
Console.WriteLine("Liquid template using Scriban ");
static void TestForLiquid()
var inputTemplateAsText = @"
{{- childItems = [1, 2, 3, 4, 5, 6] -}}
{{ func incrementVariable
{{~ for i_child in childItems ~}}
<div class='section anchor-header' id='{{i_child}}'>
<button type='button' class='anchor-header-button anchor-link'>
<svg class='icon icon-arrow' aria-hidden='true'>
<use xlink:href='#icon-arrow'></use>
<div>section-{{index}}</div>
var template = Template.Parse(inputTemplateAsText);
foreach(var error in template.Messages)
Console.WriteLine(error);
var text = template.Render();
Console.WriteLine("Result: \n {0}", text);