<commit_before>require_relative 'file_base'

module Everything
  class Blog
    module Source
      class Index < Everything::Blog::Source::FileBase
        def initialize(page_names_and_titles)
          @page_names_and_titles = page_names_and_titles
        end

        def content
          page_links_markdown
        end

        def file_name
          ''
        end

      private

        def page_links_markdown
          @page_names_and_titles.map do |page_name, page_title|
            "- [#{page_title}](/#{page_name}/)"
          end.join("\n")
        end
      end
    end
  end
end<commit_msg>Add todos related to source index<commit_after>require_relative 'file_base'

module Everything
  class Blog
    module Source
      class Index < Everything::Blog::Source::FileBase
        def initialize(page_names_and_titles)
          @page_names_and_titles = page_names_and_titles
        end

        def content
          page_links_markdown
        end

        def file_name
          ''
        end

      private

        # TODO: It would be nice to have this Markdown link and list generation
        # in its own class.
        def page_links_markdown
          @page_names_and_titles.map do |page_name, page_title|
            # TODO: Add an extra \n to the end of this string to make the list
            # get generated with p tags that contain links, instead of just a
            # list with links.
            "- [#{page_title}](/#{page_name}/)"
          end.join("\n")
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06436931079323797, 'fraction_numerical': 0.0, 'mean_word_length': 1.920303605313093, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '911508', 'n_tokens_mistral': 443, 'n_tokens_neox': 428, 'n_words': 125}