mirror of
https://gitdab.com/cadence/breezewiki.git
synced 2026-03-05 13:40:27 -05:00
Look for paths relative to source files
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#lang racket/base
|
||||
(require racket/path
|
||||
racket/runtime-path
|
||||
net/url
|
||||
web-server/servlet-dispatch
|
||||
web-server/dispatchers/filesystem-map
|
||||
@@ -15,6 +16,8 @@
|
||||
"src/page-wiki.rkt"
|
||||
"src/page-search.rkt")
|
||||
|
||||
(define-runtime-path path-static "static")
|
||||
|
||||
(define mime-types
|
||||
(hash #".css" #"text/css"
|
||||
#".svg" #"image/svg+xml"))
|
||||
@@ -30,7 +33,7 @@
|
||||
(filter:make #rx"^/static/" (files:make
|
||||
#:url->path
|
||||
(lambda (u)
|
||||
((make-url->path "static")
|
||||
((make-url->path path-static)
|
||||
(struct-copy url u [path (cdr (url-path u))])))
|
||||
#:path->mime-type
|
||||
(lambda (u)
|
||||
|
||||
Reference in New Issue
Block a user