<commit_before>-- File: Main.hs

{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE Arrows            #-}
{-# LANGUAGE OverloadedStrings #-}

module Main where

import Text.Pandoc as Pandoc

import Hakyll

main ∷ IO ()
main = hakyll$ do
  match ("images/*" .||. "js/*" .||. "favicon.ico" .||. "fonts/*") $ do
    route idRoute
    compile copyFileCompiler
    
  match "css/*" $ do
    route idRoute
    compile compressCssCompiler

  match (fromList pages) $ do
    route $ setExtension ".html"
    compile $ pandocCompiler
      >>= loadAndApplyTemplate "templates/default.html" defaultContext
      >>= relativizeUrls
      >>= removeIndexHtml

  where
    pages =
      [  "about/index.md"<commit_msg>not using pandoc yet. add separate context for index.html<commit_after>-- File: Main.hs

{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE Arrows            #-}
{-# LANGUAGE OverloadedStrings #-}

module Main where

import Hakyll

main ∷ IO ()
main = hakyll$ do
  match ("images/*" .||. "js/*" .||. "favicon.ico" .||. "fonts/*") $ do
    route idRoute
    compile copyFileCompiler
    
  match "css/*" $ do
    route idRoute
    compile compressCssCompiler

  match "index.html" $ do
    route idRoute
    compile $ pandocCompiler
      >>= loadAndApplyTemplate "templates/default.html" defaultContext
      >>= relativizeUrls
      
  match (fromList pages) $ do
    route $ setExtension ".html"
    compile $ pandocCompiler
      >>= loadAndApplyTemplate "templates/default.html" defaultContext
      >>= relativizeUrls
      >>= removeIndexHtml

  where
    pages =
      [  "about/index.md"
{'fraction_non_alphanumeric': 0.1273644388398487, 'fraction_numerical': 0.0, 'mean_word_length': 2.707943925233645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4170632', 'n_tokens_mistral': 529, 'n_tokens_neox': 514, 'n_words': 130}