<commit_before>//- index page
if is_home()
  h4.page-title Recent Articles
  each post in site.posts.sort('date', 'desc').toArray()
    - var reading_length = Math.ceil(post.content.replace(/[^a-zA-Z\s]/g, '').split(/[\s]+/).length / 250)
    a.article(href= config.root + post.path)
      article.item(itemscope, itemprop='blogPost', itemtype='https://schema.org/BlogPosting')
        h2(itemprop='headline')= post.title
        span.post-meta
          | Published on
          time(itemprop='datePublished', datetime= post.date.toISOString())= full_date(new Date(post.date), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(post.date), 'H:mm')
          | , #{reading_length} min read
        p(itemprop='text').post-excerpt= post.intro ? post.intro : post.content.replace(/<(?:.|\n)*?>/gm, '').substr(0, 220)
  footer(itemscope, itemtype='https://schema.org/WPFooter')
    include _footer
//- articles page
if is_page() && page.title.toLowerCase() == 'articles'
  article.full
    h1(itemprop='headline')= page.title
    != page.content
    - var lastyear = 0
    for post, index in site.posts.sort('date', 'desc').toArray()
      if lastyear != post.date.format('YYYY')
        if index != 0
          | </ul>
        - lastyear = post.date.format('YYYY')
        h4= lastyear
        | <ul>
        li(itemprop='name')
          a(href= config.root + post.path, itemprop='url') #{post.title}
          |  &mdash;
          time(itemprop='datePublished', datetime= post.date.toISOString())= full_date(new Date(post.date), ' MMMM Do')
      else
        li
          a(href= config.root + post.path) #{post.title}
          |  &mdash;
          time(itemprop='datePublished', datetime= post.date.toISOString())= full_date(new Date(post.date), ' MMMM Do')
    if site.posts.toArray().length != 0
      | </ul>
  include _comments
else if is_page()
  article.full
    h1(itemprop='headline')= page.title
    if page.updated
      span.post-meta
        | Last updated on
        time(itemprop='dateModified', datetime= page.date.toISOString())= full_date(new Date(page.updated), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(page.updated), 'H:mm')
    != page.content
  include _comments
else if is_post()
  article.full
    h1(itemprop='headline')= page.title
    span.post-meta
      | Published on
      time(itemprop='datePublished', datetime= page.date.toISOString())= full_date(new Date(page.date), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(page.date), 'H:mm')
      if page.updated
        br
        | Last updated on
        time(itemprop='dateModified', datetime= page.date.toISOString())= full_date(new Date(page.updated), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(page.updated), 'H:mm')
    != page.content
  include _comments<commit_msg>Add layout variable for pages without date<commit_after>//- index page
if is_home()
  h4.page-title Recent Articles
  each post in site.posts.sort('date', 'desc').toArray()
    - var reading_length = Math.ceil(post.content.replace(/[^a-zA-Z\s]/g, '').split(/[\s]+/).length / 250)
    a.article(href= config.root + post.path)
      article.item(itemscope, itemprop='blogPost', itemtype='https://schema.org/BlogPosting')
        h2(itemprop='headline')= post.title
        span.post-meta
          | Published on
          time(itemprop='datePublished', datetime= post.date.toISOString())= full_date(new Date(post.date), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(post.date), 'H:mm')
          | , #{reading_length} min read
        p(itemprop='text').post-excerpt= post.intro ? post.intro : post.content.replace(/<(?:.|\n)*?>/gm, '').substr(0, 220)
  footer(itemscope, itemtype='https://schema.org/WPFooter')
    include _footer
//- articles page
if is_page() && page.title.toLowerCase() == 'articles'
  article.full
    h1(itemprop='headline')= page.title
    != page.content
    - var lastyear = 0
    for post, index in site.posts.sort('date', 'desc').toArray()
      if lastyear != post.date.format('YYYY')
        if index != 0
          | </ul>
        - lastyear = post.date.format('YYYY')
        h4= lastyear
        | <ul>
        li(itemprop='name')
          a(href= config.root + post.path, itemprop='url') #{post.title}
          |  &mdash;
          time(itemprop='datePublished', datetime= post.date.toISOString())= full_date(new Date(post.date), ' MMMM Do')
      else
        li
          a(href= config.root + post.path) #{post.title}
          |  &mdash;
          time(itemprop='datePublished', datetime= post.date.toISOString())= full_date(new Date(post.date), ' MMMM Do')
    if site.posts.toArray().length != 0
      | </ul>
  include _comments
else if is_page()
  article.full
    h1(itemprop='headline')= page.title
    if page.layout != 'clean'
      if page.updated
        span.post-meta
          | Last updated on
          time(itemprop='dateModified', datetime= page.date.toISOString())= full_date(new Date(page.updated), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(page.updated), 'H:mm')
    != page.content
  include _comments
else if is_post()
  article.full
    h1(itemprop='headline')= page.title
    span.post-meta
      | Published on
      time(itemprop='datePublished', datetime= page.date.toISOString())= full_date(new Date(page.date), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(page.date), 'H:mm')
      if page.updated
        br
        | Last updated on
        time(itemprop='dateModified', datetime= page.date.toISOString())= full_date(new Date(page.updated), ' dddd, MMMM Do YYYY') + ' at ' + full_date(new Date(page.updated), 'H:mm')
    != page.content
  include _comments
{'fraction_non_alphanumeric': 0.16480397374489977, 'fraction_numerical': 0.005676778428241973, 'mean_word_length': 3.0042613636363638, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '105344', 'n_tokens_mistral': 1935, 'n_tokens_neox': 1888, 'n_words': 392}