scribble icon indicating copy to clipboard operation
scribble copied to clipboard

Package catalog links?

Open jackfirth opened this issue 7 years ago • 4 comments

In the block that defmodule outputs: screen shot 2017-08-27 at 12 57 04 am ... it would be nice if the package: mock text was also a hyperlink to the mock package catalog entry (https://pkgd.racket-lang.org/pkgn/package/mock). I'm not sure how to implement this when different packages on the same system are installed from catalogs other than pkgd.racket-lang.org, or what to do for packages that aren't installed from a catalog at all.

jackfirth avatar Aug 27 '17 08:08 jackfirth

What if defmodule took an optional "external link" argument?

Something like: @defmodule[mock #:url "pkgd.racket-lang...."]

bennn avatar Aug 27 '17 13:08 bennn

I would want to avoid an API that forced a package's documentation to assume which catalog the package would be published in, but that could work as a kludge.

jackfirth avatar Aug 27 '17 22:08 jackfirth

How about #:catalog-package-url, which is a format-style string that defaults to https://pkgs.racket-lang.org/package/~a?

greghendershott avatar Aug 31 '17 16:08 greghendershott

I discussed this with @mflatt and committed a WIP version while he lets me know the better way to improve it. The important take-away is that packages should not be referred to haphazardly because it is not up to the author where to get the package from, so the documentation should detect where it got the package from. (That doesn't say anything about the case where you want to refer to a package that isn't installed.)

jeapostrophe avatar Sep 05 '17 09:09 jeapostrophe