<commit_before>extends base

block title
  if page.category
     title= page.category + " | " + config.title
  if page.tag
     title= page.tag + " | " + config.title
  if page.archive
     title= __('archive') + " | " + config.title

block main
  article
    .container
      if page.category || page.tag
          h1.label-title=  (page.category || page.tag)
      .post
        // show all categories and tags
        if !(page.category || page.tag)
            .all-categories
              ul.tag-box.list-unstyled
                for category in site.categories.sort('name').toArray()
                  li
                    a(href=root+'/categories/'+category.name.replace(new RegExp(' ', 'g'), '-'))= category.name
                      span= category.posts.length
            .all-tags
              ul.tag-box.list-unstyled
                for tag in site.tags.sort('name').toArray()
                  li
                    a(href=root+'/tags/'+tag.name.replace(new RegExp(' ', 'g'), '-'))= tag.name
                      span= tag.posts.length

        .post-archive
            //Use lodash to classify posts. See https://lodash.com/docs#groupBy
            each posts, year in _.groupBy(page.posts.toArray(), function(p){return -p.date.format('YYYY')})
              h2= -year
              ul.listing
                for post in posts
                  li
                    span.date= post.date.format('YYYY/MM/DD')
                    a(href=url_for(post.path), title=post.title)
                      = post.title
  include _partial/paginator.jade<commit_msg>[bug-fix] we should use the official API to get the links to tags and categories<commit_after>extends base

block title
  if page.category
     title= page.category + " | " + config.title
  if page.tag
     title= page.tag + " | " + config.title
  if page.archive
     title= __('archive') + " | " + config.title

block main
  article
    .container
      if page.category || page.tag
          h1.label-title=  (page.category || page.tag)
      .post
        // show all categories and tags
        if !(page.category || page.tag)
            .all-categories
              ul.tag-box.list-unstyled
                for category in site.categories.sort('name').toArray()
                  li
                    a(href=url_for(category.path))= category.name
                      span= category.length
            .all-tags
              ul.tag-box.list-unstyled
                for tag in site.tags.sort('name').toArray()
                  li
                    a(href=url_for(tag.path))= tag.name
                      span= tag.length

        .post-archive
            //Use lodash to classify posts. See https://lodash.com/docs#groupBy
            each posts, year in _.groupBy(page.posts.toArray(), function(p){return -p.date.format('YYYY')})
              h2= -year
              ul.listing
                for post in posts
                  li
                    span.date= post.date.format('YYYY/MM/DD')
                    a(href=url_for(post.path), title=post.title)
                      = post.title
  include _partial/paginator.jade
{'fraction_non_alphanumeric': 0.11800447713463383, 'fraction_numerical': 0.0012791813239526704, 'mean_word_length': 1.4904458598726114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1505242', 'n_tokens_mistral': 901, 'n_tokens_neox': 865, 'n_words': 197}