diff --git a/private/rules.rkt b/private/rules.rkt index 0935512..d2f8277 100644 --- a/private/rules.rkt +++ b/private/rules.rkt @@ -7,6 +7,7 @@ markdown markdown/toc racket/fasl + (only-in sass [compile/string sass-compile/string]) "compile.rkt" "prefs.rkt") @@ -184,11 +185,17 @@ (write-bytes (s-exp->fasl (for/hash ([(k v) (in-hash index)]) (values k (set->list v)))) out))))) +(define compile-css + (rule '("src/style.sass") "public/style.css" + (lambda (in out) + (define str (port->string (hash-ref in "src/style.sass"))) + (write-string (sass-compile/string str #t) out)))) (define compiler-rules (set-union (generate-post-render-rules) - (set compile-index-json + (set compile-css + compile-index-json compile-webfinger))) (define ops (generate-operations compiler-rules)) diff --git a/scripts/init b/scripts/init index 5a03af7..4f53588 100755 --- a/scripts/init +++ b/scripts/init @@ -54,7 +54,7 @@ (write-string "this section left intentionally blank") (void))) (with-output-to-file "src/style.sass" - (lambda () (write-string "// styles go here :P") (void))) + (lambda () (write-string "// styles go here :P\n") (void))) (make-directory "src/posts") (make-directory "src/drafts")