-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
darwin.rkt
26 lines (23 loc) · 825 Bytes
/
darwin.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#lang darwin/config
;; Called early when Darwin launches. Use this to set parameters defined
;; in darwin/params.
(define/contract (init)
(-> any)
(current-scheme/host "https://racket-news.com")
(current-title "Racket News")
(current-author "Paulo Matos")
(current-output-dir "public"))
;; Called once per post and non-post page, on the contents.
(define/contract (enhance-body xs)
(-> (listof xexpr/c) (listof xexpr/c))
;; Here we pass the xexprs through a series of functions.
(~> xs
(syntax-highlight #:python-executable "python"
#:line-numbers? #t
#:css-class "source")
(auto-embed-tweets #:parents? #t)
(add-racket-doc-links #:code? #t #:prose? #f)))
;; Called from `raco darwin --clean`.
(define/contract (clean)
(-> any)
(void))