<commit_before>{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import Hakyll
import Control.Arrow ((>>>), arr)

-- Compiler for HTML pages, don't use pandoc
htmlCompiler =
  readPageCompiler >>>
  addDefaultFields >>>
  arr applySelf


main :: IO ()
main = hakyll $ do

  match "images/*" $ do
    route   idRoute
    compile copyFileCompiler

  match "js/*" $ do
    route   idRoute
    compile copyFileCompiler

  match "LICENSE" $ do
    route   idRoute
    compile copyFileCompiler

  -- generalize?
  match "js/**/*" $ do
    route   idRoute
    compile copyFileCompiler

  match "posts/*.html" $ do
    route $ setExtension "html"
    compile $ htmlCompiler
          >>> applyTemplateCompiler "templates/default.html"

  match "posts/*" $ do
    route $ setExtension "html"
    compile $ pageCompiler<commit_msg>cleanup<commit_after>{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import Hakyll
import Control.Arrow ((>>>), arr)

-- Compiler for HTML pages, don't use pandoc
htmlCompiler =
  readPageCompiler >>>
  addDefaultFields >>>
  arr applySelf


main :: IO ()
main = hakyll $ do

  match "images/*" $ do
    route   idRoute
    compile copyFileCompiler

  match "js/*" $ do
    route   idRoute
    compile copyFileCompiler

  match "js/**/*" $ do
    route   idRoute
    compile copyFileCompiler

  match "LICENSE" $ do
    route   idRoute
    compile copyFileCompiler


  match "posts/*.html" $ do
    route $ setExtension "html"
    compile $ htmlCompiler
          >>> applyTemplateCompiler "templates/default.html"

  match "posts/*" $ do
    route $ setExtension "html"
    compile $ pageCompiler
{'fraction_non_alphanumeric': 0.10401459854014598, 'fraction_numerical': 0.0, 'mean_word_length': 2.954326923076923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '7494486', 'n_tokens_mistral': 504, 'n_tokens_neox': 487, 'n_words': 150}