Look for paths relative to source files

This commit is contained in:
Cadence Ember
2022-08-24 13:23:46 +12:00
parent 8c65b2ed02
commit 73a5cb68c5
2 changed files with 8 additions and 2 deletions

View File

@@ -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)