diff --git a/breezewiki.rkt b/breezewiki.rkt index 0421e12..ee4f9b9 100644 --- a/breezewiki.rkt +++ b/breezewiki.rkt @@ -24,20 +24,15 @@ (set-reload-poll-interval! #f)) (reload!) -(define ch (make-channel)) -(define (start) - (serve/launch/wait - #:listen-ip (if (config-true? 'debug) "127.0.0.1" #f) - #:port (string->number (config-get 'port)) - (λ (quit) - (channel-put ch (lambda () (semaphore-post quit))) - (sequencer:make - (pathprocedure:make "/" page-home) - (pathprocedure:make "/proxy" page-proxy) - (filter:make #rx"^/[a-z-]+/wiki/Category:.+$" (lift:make page-category)) - (filter:make #rx"^/[a-z-]+/wiki/.+$" (lift:make page-wiki)) - (filter:make #rx"^/[a-z-]+/search$" (lift:make page-search)) - static-dispatcher - (lift:make page-not-found))))) -(define server-t (thread start)) -(define quit (channel-get ch)) +(serve/launch/wait + #:listen-ip (if (config-true? 'debug) "127.0.0.1" #f) + #:port (string->number (config-get 'port)) + (λ (quit) + (sequencer:make + (pathprocedure:make "/" page-home) + (pathprocedure:make "/proxy" page-proxy) + (filter:make #rx"^/[a-z-]+/wiki/Category:.+$" (lift:make page-category)) + (filter:make #rx"^/[a-z-]+/wiki/.+$" (lift:make page-wiki)) + (filter:make #rx"^/[a-z-]+/search$" (lift:make page-search)) + static-dispatcher + (lift:make page-not-found)))) diff --git a/src/page-home.rkt b/src/page-home.rkt index 7cdbf4f..c42102e 100644 --- a/src/page-home.rkt +++ b/src/page-home.rkt @@ -57,13 +57,9 @@ (div (@ (class "internal-footer")) (img (@ (class "my-logo") (src "/static/breezewiki.svg"))) ,(if (config-get 'instance-is-official) - `(div - (p ,(format "This instance is run by the ~a developer, " (config-get 'application-name)) + `(p ,(format "This instance is run by the ~a developer, " (config-get 'application-name)) (a (@ (href "https://cadence.moe/contact")) "Cadence.")) - (p "Hosting generously provided by " - (a (@ (href "://alphamethyl.barr0w.net/")) - "alphamethyl."))) `(p ,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application-name)))) (p "Text content on wikis run by Fandom is available under the Creative Commons Attribution-Share Alike License 3.0 (Unported), " diff --git a/src/page-proxy.rkt b/src/page-proxy.rkt index 9d09527..3b63506 100644 --- a/src/page-proxy.rkt +++ b/src/page-proxy.rkt @@ -4,6 +4,9 @@ racket/port ; libs (prefix-in easy: net/http-easy) + ; html libs + html-parsing + html-writing ; web server libs net/url web-server/http