Make package names links
This commit is contained in:
parent
9fc96fc56e
commit
426cf50f11
|
@ -11,6 +11,7 @@
|
||||||
setup/main-collects
|
setup/main-collects
|
||||||
pkg/path
|
pkg/path
|
||||||
racket/list
|
racket/list
|
||||||
|
scribble/html-properties
|
||||||
(for-syntax scheme/base
|
(for-syntax scheme/base
|
||||||
syntax/parse)
|
syntax/parse)
|
||||||
(for-label scheme/base))
|
(for-label scheme/base))
|
||||||
|
@ -201,6 +202,21 @@
|
||||||
(list pkg)
|
(list pkg)
|
||||||
null)))
|
null)))
|
||||||
|
|
||||||
|
;; mflatt thinks this should not be exposed
|
||||||
|
(define (racketpkgname pkg)
|
||||||
|
(link
|
||||||
|
;; XXX Look at (pkg-info-orig-pkg (hash-ref (read-pkgs-db scope)
|
||||||
|
;; pkg)) and only show link if catalog? Or did mflatt have
|
||||||
|
;; something else in mind? But I'd have to know the scope and pass
|
||||||
|
;; that down from compute-packages
|
||||||
|
(format "https://pkgs.racket-lang.org/package/~a" pkg)
|
||||||
|
(tt pkg)
|
||||||
|
#:style (make-style #f
|
||||||
|
(list "plainlink"
|
||||||
|
(hover-property
|
||||||
|
(format "Install this package using `raco pkg install ~a`"
|
||||||
|
pkg))))))
|
||||||
|
|
||||||
(define (*defmodule names modpaths module-path packages link-target? lang content req)
|
(define (*defmodule names modpaths module-path packages link-target? lang content req)
|
||||||
(let ([modpaths (or modpaths names)])
|
(let ([modpaths (or modpaths names)])
|
||||||
(define pkg-spec
|
(define pkg-spec
|
||||||
|
@ -218,7 +234,8 @@
|
||||||
""
|
""
|
||||||
"s")))
|
"s")))
|
||||||
" "
|
" "
|
||||||
(add-between (map tt pkgs) ", "))))))))))
|
(add-between (map racketpkgname pkgs)
|
||||||
|
", "))))))))))
|
||||||
(define (flow-width f) (apply max (map block-width f)))
|
(define (flow-width f) (apply max (map block-width f)))
|
||||||
(define libs-specs
|
(define libs-specs
|
||||||
;; make-desc : element -> flow
|
;; make-desc : element -> flow
|
||||||
|
|
Loading…
Reference in New Issue
Block a user