|
|
@ -147,7 +147,7 @@
|
|
|
|
(define template-path (or maybe-template-path (get-template-for source-path output-path)))
|
|
|
|
(define template-path (or maybe-template-path (get-template-for source-path output-path)))
|
|
|
|
|
|
|
|
|
|
|
|
;; output-path and template-path may not have an extension, so check them in order with fallback
|
|
|
|
;; output-path and template-path may not have an extension, so check them in order with fallback
|
|
|
|
(message (format "rendering /~a"
|
|
|
|
(message (format "rendering /~a"
|
|
|
|
(find-relative-path (current-project-root) source-path)))
|
|
|
|
(find-relative-path (current-project-root) source-path)))
|
|
|
|
(match-define-values ((cons render-result _) _ real _)
|
|
|
|
(match-define-values ((cons render-result _) _ real _)
|
|
|
|
(parameterize ([current-poly-target (->symbol (or (get-ext output-path)
|
|
|
|
(parameterize ([current-poly-target (->symbol (or (get-ext output-path)
|
|
|
@ -175,12 +175,11 @@
|
|
|
|
(local-require scribble/core scribble/manual (prefix-in scribble- scribble/render))
|
|
|
|
(local-require scribble/core scribble/manual (prefix-in scribble- scribble/render))
|
|
|
|
(define source-dir (dirname source-path))
|
|
|
|
(define source-dir (dirname source-path))
|
|
|
|
;; make fresh namespace for scribble rendering (avoids dep/zo caching)
|
|
|
|
;; make fresh namespace for scribble rendering (avoids dep/zo caching)
|
|
|
|
(define outer-ns (namespace-anchor->namespace render-module-ns))
|
|
|
|
(parameterize ([current-namespace (make-base-namespace)]
|
|
|
|
(define new-ns (make-base-namespace))
|
|
|
|
|
|
|
|
(namespace-attach-module outer-ns 'scribble/core new-ns)
|
|
|
|
|
|
|
|
(namespace-attach-module outer-ns 'scribble/manual new-ns)
|
|
|
|
|
|
|
|
(parameterize ([current-namespace new-ns]
|
|
|
|
|
|
|
|
[current-directory (->complete-path source-dir)])
|
|
|
|
[current-directory (->complete-path source-dir)])
|
|
|
|
|
|
|
|
(define outer-ns (namespace-anchor->namespace render-module-ns))
|
|
|
|
|
|
|
|
(namespace-attach-module outer-ns 'scribble/core)
|
|
|
|
|
|
|
|
(namespace-attach-module outer-ns 'scribble/manual)
|
|
|
|
;; scribble/lp files have their doc export in a 'doc submodule, so check both locations
|
|
|
|
;; scribble/lp files have their doc export in a 'doc submodule, so check both locations
|
|
|
|
(match (cond
|
|
|
|
(match (cond
|
|
|
|
[(dynamic-require source-path 'doc (λ () #false))]
|
|
|
|
[(dynamic-require source-path 'doc (λ () #false))]
|
|
|
|