point send-main-page to racket website when docs not found
This commit is contained in:
parent
a2d2f0472f
commit
5b639ebb82
|
@ -39,11 +39,16 @@
|
||||||
(string->url
|
(string->url
|
||||||
(format "q?~a" query)))
|
(format "q?~a" query)))
|
||||||
null))])))]
|
null))])))]
|
||||||
[else
|
[else
|
||||||
(let* ([path (build-path (find-user-doc-dir) sub)]
|
(let* ([path (build-path (find-user-doc-dir) sub)]
|
||||||
[path (if (file-exists? path) path (build-path (find-doc-dir) sub))])
|
[path (if (file-exists? path) path (build-path (find-doc-dir) sub))])
|
||||||
(notify path)
|
(notify path)
|
||||||
(send-url/file path #:fragment fragment #:query query))]))
|
(if (file-exists? path)
|
||||||
|
(send-url/file path #:fragment fragment #:query query)
|
||||||
|
(let ([part (lambda (pfx x) (if x (string-append pfx x) ""))])
|
||||||
|
(send-url (string-append
|
||||||
|
"https://docs.racket-lang.org/"
|
||||||
|
sub (part "#" fragment) (part "?" query))))))]))
|
||||||
|
|
||||||
;; This is an example of changing this code to use the online manuals.
|
;; This is an example of changing this code to use the online manuals.
|
||||||
;; Normally, it's better to set `doc-open-url` in "etc/config.rktd",
|
;; Normally, it's better to set `doc-open-url` in "etc/config.rktd",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user