<commit_before>module.exports = (dato, root, i18n) => {

  // inside the "post" directory...
  root.directory("site/content/post", (dir) => {

    // ...iterate over the "post" records...
    dato.posts.forEach(post => {

      // ...and create a markdown file for each article!
      dir.createPost(`${post.slug}.md`, "yaml", {
        frontmatter: {
          draft: post.draft,
          title: post.title,
          subtitle: post.subtitle,
          author: post.author.firstName,
          author_image: post.author.profilePicture.url(),
          author_id: post.author.id,
          type: "post",
          tags: post.tag.map(tag => tag.slug),
          category: post.category.name,
          date: post.date,
          country: {
              name: post.country.name,
              code: post.country.countryCode,
              continent: post.country.continent.name
          },
          feature_image: post.featureImage.url(),
          intro: post.introBlock,
          content: post.contentContainer.toMap()
        },
        content: post.content
      });
    });
  });
}<commit_msg>Fix length counts<commit_after>module.exports = (dato, root, i18n) => {

  // inside the "post" directory...
  root.directory("site/content/post", (dir) => {

    // ...iterate over the "post" records...
    dato.posts.forEach(post => {

      const onlyContent = post.contentContainer.toMap().filter((container) => container.content).map(container => container.content);

      // ...and create a markdown file for each article!
      dir.createPost(`${post.slug}.md`, "yaml", {
        frontmatter: {
          draft: post.draft,
          title: post.title,
          subtitle: post.subtitle,
          author: post.author.firstName,
          author_image: post.author.profilePicture.url(),
          author_id: post.author.id,
          type: "post",
          tags: post.tag.map(tag => tag.slug),
          category: post.category.name,
          date: post.date,
          country: {
              name: post.country.name,
              code: post.country.countryCode,
              continent: post.country.continent.name
          },
          feature_image: post.featureImage.url(),
          intro: post.introBlock,
          content: post.contentContainer.toMap()
        },
        content: onlyContent
      });
    });
  });
}
{'fraction_non_alphanumeric': 0.1421861656703672, 'fraction_numerical': 0.0017079419299743809, 'mean_word_length': 1.896168108776267, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2523327', 'n_tokens_mistral': 678, 'n_tokens_neox': 665, 'n_words': 133}