<commit_before>module Brightbox
  module Nanoc3
    module Helpers
      # Generates a blog at a subpath and makes available helpers for listing recent posts
      # elsewhere on the site.
      # 
      # You'll need to add a preprocess block to generate the blog:
      # 
      #   preprocess do
      #     generate_blog!
      #   end
      # 
      # And some rules to process the content of the blog and direct the output to the right place
      # 
      #   compile "/posts/*/" do
      #     filter :kramdown
      #     filter :erb
      #   
      #     layout "blog_page"
      #     layout "base"
      #   end
      #   
      #   route "/posts/*" do
      #     # "/posts/2011-01-01-some-title-here" => "/2011/01/01/some-title-here/index.html"
      #     "/blog/#{item.identifier.split("/", 3).last.gsub(/^(\d+)-(\d+)-(\d+)-(.*)$/, '\1/\2/\3/\4')}index.html"
      #   end
      # 
      module Blogging
        GenerateError = Class.new(RuntimeError)

        # Make sure we include those modules we need to function
        include ::Nanoc3::Helpers::Tagging
        include ::Nanoc3::Helpers::Blogging
        include Pagination

        # We're dealing with posts, not articles
        def posts
          sorted_articles
        end<commit_msg>More info on how to use Blogging<commit_after>module Brightbox
  module Nanoc3
    module Helpers
      # Generates a blog at a subpath and makes available helpers for listing recent posts
      # elsewhere on the site.
      # 
      # You'll need to add a preprocess block to generate the blog:
      # 
      #   preprocess do
      #     generate_blog!
      #   end
      # 
      # And some rules to process the content of the blog and direct the output to the right place
      # 
      #   compile "/posts/*/" do
      #     filter :kramdown
      #     filter :erb
      #   
      #     layout "blog_page"
      #     layout "base"
      #   end
      #   
      #   route "/posts/*" do
      #     # "/posts/2011-01-01-some-title-here" => "/2011/01/01/some-title-here/index.html"
      #     "/blog/#{item.identifier.split("/", 3).last.gsub(/^(\d+)-(\d+)-(\d+)-(.*)$/, '\1/\2/\3/\4')}index.html"
      #   end
      # 
      # And then you need to add your blog posts to ./posts/*.md (given you're using markdown.) They should
      # be named in the format yyyy-mm-dd-slug-of-post.md and it'll automatically pick out the date & slug.
      # 
      module Blogging
        GenerateError = Class.new(RuntimeError)

        # Make sure we include those modules we need to function
        include ::Nanoc3::Helpers::Tagging
        include ::Nanoc3::Helpers::Blogging
        include Pagination

        # We're dealing with posts, not articles
        def posts
          sorted_articles
        end
{'fraction_non_alphanumeric': 0.1105907780979827, 'fraction_numerical': 0.01729106628242075, 'mean_word_length': 1.7686939182452641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1545654', 'n_tokens_mistral': 868, 'n_tokens_neox': 815, 'n_words': 252}