From b64dd9f2733d01ab28449852dc704ed8e5888fe6 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 3 Mar 2014 11:53:59 -0800 Subject: [PATCH] nits --- render.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/render.rkt b/render.rkt index e9c95f9..894b700 100644 --- a/render.rkt +++ b/render.rkt @@ -120,7 +120,7 @@ (define/contract (render-markup-source source-path [maybe-template-path #f]) ((complete-path?) ((or/c #f complete-path?)) . ->* . bytes?) - (match-define-values (source-dir _ _) (split-path source-path)) ; todo: this won't work with source files nested down one level + (match-define-values (source-dir _ _) (split-path source-path)) (define template-path (or maybe-template-path (get-template-for source-path))) (render-for-dev-server template-path) ; because template might have its own preprocessor source @@ -156,7 +156,7 @@ (let ([source-metas (cached-require source-path 'metas)]) (and (world:template-meta-key . in? . source-metas) (build-path source-dir (get source-metas world:template-meta-key))))) ; path based on metas - (build-path source-dir + (build-path (world:current-project-root) (add-ext (add-ext world:default-template-prefix (get-ext (->output-path source-path))) world:template-source-ext))))) ; path to default template (build-path (world:current-server-extras-path) world:fallback-template)))) ; fallback template