<commit_before>private static $kt;

public static function kt() {
  return static::$kt;
}

public static function kirby($vars = array()) {
  $data = array();

  foreach(site()->content()->data() as $key => $value) {
    $data[$key] = $data['site' . ucfirst($key)] = $value->toString();
  }

  foreach(page()->content()->data() as $key => $value) {
    $data[$key] = $value->toString();
  }

  foreach($vars as $key => $value) {
    if ($value === static::$kt) {
      $value = page()->content()->get($key)->kirbytext();
    }
    else if (is_callable($value)) {
      $value = array_map($value, page()->content()->get($key)->yaml());
    }
    $data[$key] = $value;
  }

  $ref = '/' . page()->intendedTemplate() . '.tl';
  if (static::resolve($ref)) {
    echo static::render($ref, $data);
  }
  else {
    echo static::render('/' . page()->template() . '.tl', $data);
  }
}<commit_msg>use tl() instead of tl::render<commit_after>private static $kt;

public static function kt() {
  return static::$kt;
}

public static function kirby($vars = array()) {
  $data = array();

  foreach(site()->content()->data() as $key => $value) {
    $data[$key] = $data['site' . ucfirst($key)] = $value->toString();
  }

  foreach(page()->content()->data() as $key => $value) {
    $data[$key] = $value->toString();
  }

  foreach($vars as $key => $value) {
    if ($value === static::$kt) {
      $value = page()->content()->get($key)->kirbytext();
    }
    else if (is_callable($value)) {
      $value = array_map($value, page()->content()->get($key)->yaml());
    }
    $data[$key] = $value;
  }

  $ref = '/' . page()->intendedTemplate() . '.tl';
  if (static::resolve($ref)) {
    echo tl($ref, $data);
  }
  else {
    echo tl('/' . page()->template() . '.tl', $data);
  }
}
{'fraction_non_alphanumeric': 0.2546689303904924, 'fraction_numerical': 0.0, 'mean_word_length': 3.365432098765432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '438631', 'n_tokens_mistral': 618, 'n_tokens_neox': 610, 'n_words': 126}