<commit_before><?php
use genug\Api as g;

const SITE_TITLE = 'my site';

/**
 * @deprecated
 */
function genug_helper_categoryTitle(\genug\Page\Category $pageCat) {
    try {
      return g::categories()->fetch($pageCat)->title();
    } catch (\Throwable $e) {
      return $pageCat;
    }
}

?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?= g::requestedPage()->title()?><?php if (g::requestedPage()->category() !== g::mainCategory()) echo ' - ' . genug_helper_categoryTitle(g::requestedPage()->category()) ?> | <?= SITE_TITLE ?></title>
<link
  rel="stylesheet"
  href="/asset/css/style.css" />
</head>
<body>
  <header>
    <h1>
      <a href="<?= g::homepage()->id() ?>"><?= SITE_TITLE ?></a>
    </h1>
  </header>
  <main>
  <article>
    <header>
      <h1><?= g::requestedPage()->title() ?></h1>
    </header>
    <?= g::requestedPage()->content()?>
    <footer>
      <ul>
        <li>date: <time datetime="<?= g::requestedPage()->date() ?>"><?= g::requestedPage()->date()->format(DATE_RFC1123) ?></time></li>
        <li>category: <span
          data-category="<?= g::requestedPage()->category() ?>"><?= genug_helper_categoryTitle(g::requestedPage()->category()) ?></span></li>
      </ul>
    </footer>
  </article>
  </main>
  <nav>
    <h1>all pages</h1>
    <ul><commit_msg>fixed: title in main template<commit_after><?php
use genug\Api as g;

const SITE_TITLE = 'my site';

/**
 * @deprecated
 */
function genug_helper_categoryTitle(\genug\Page\Category $pageCat) {
    try {
      return g::categories()->fetch($pageCat)->title();
    } catch (\Throwable $e) {
      return $pageCat;
    }
}

?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><?= g::requestedPage()->title()?><?php if ((string) g::requestedPage()->category() !== (string) g::mainCategory()->id()) echo ' - ' . genug_helper_categoryTitle(g::requestedPage()->category()) ?> | <?= SITE_TITLE ?></title>
<link
  rel="stylesheet"
  href="/asset/css/style.css" />
</head>
<body>
  <header>
    <h1>
      <a href="<?= g::homepage()->id() ?>"><?= SITE_TITLE ?></a>
    </h1>
  </header>
  <main>
  <article>
    <header>
      <h1><?= g::requestedPage()->title() ?></h1>
    </header>
    <?= g::requestedPage()->content()?>
    <footer>
      <ul>
        <li>date: <time datetime="<?= g::requestedPage()->date() ?>"><?= g::requestedPage()->date()->format(DATE_RFC1123) ?></time></li>
        <li>category: <span
          data-category="<?= g::requestedPage()->category() ?>"><?= genug_helper_categoryTitle(g::requestedPage()->category()) ?></span></li>
      </ul>
    </footer>
  </article>
  </main>
  <nav>
    <h1>all pages</h1>
    <ul>
{'fraction_non_alphanumeric': 0.25245283018867926, 'fraction_numerical': 0.00830188679245283, 'mean_word_length': 3.650877192982456, 'pattern_counts': {'":': 0, '<': 105, '<?xml version=': 0, '>': 132, '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': '6794361', 'n_tokens_mistral': 962, 'n_tokens_neox': 975, 'n_words': 165}