(module io * (import scheme (chicken file) (chicken io)) (import config paths) (define (read-post-file config path) (let ([absolute-path (absolute-post-path config path)]) (call-with-input-file absolute-path (lambda (port) (read-string #f port))))) (define (fetch-posts config) (let* ([posts-path (config-posts-dir config)] [post-paths (directory posts-path)]) (map (lambda (path) (cons path (read-post-file config path))) post-paths))))