<commit_before>{-# LANGUAGE OverloadedStrings #-}

module Journal (journalRoutes, journalCtx, entries) where

import Hakyll

entries = recentFirst =<< loadAll "journal/*"

journalRoutes :: Rules ()
journalRoutes = do
  match "journal/**.org" $ do
    route $ setExtension "html"
    compile $ pandocCompiler
          >>= loadAndApplyTemplate "templates/journal.html" journalCtx

  -- source code matching: just copy it over
  match "journal/**" $ version "raw" $ do
    route idRoute
    compile copyFileCompiler

journalCtx :: Context String
journalCtx =
  dateField "date" "%Y/%m/%d" `mappend`
  defaultContext<commit_msg>fix journal.hs<commit_after>{-# LANGUAGE OverloadedStrings #-}

module Journal (journalRoutes, journalCtx) where

import Hakyll

journalRoutes :: Rules ()
journalRoutes = do
  match "journal/**.org" $ do
    route $ setExtension "html"
    compile $ pandocCompiler
          >>= loadAndApplyTemplate "templates/journal.html" journalCtx

  -- source code matching: just copy it over
  match "journal/**" $ version "raw" $ do
    route idRoute
    compile copyFileCompiler

journalCtx :: Context String
journalCtx =
  dateField "date" "%Y/%m/%d" `mappend`
  defaultContext
{'fraction_non_alphanumeric': 0.11046025104602511, 'fraction_numerical': 0.0, 'mean_word_length': 3.9833333333333334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '280582', 'n_tokens_mistral': 354, 'n_tokens_neox': 361, 'n_words': 105}