How to redirect only some library documentation in Scribble

36 views
Skip to first unread message

William J. Bowman

unread,
Sep 29, 2020, 8:51:49 PM9/29/20
to Racket Users
I'm writing a large Scribble document which links to package documentation.
I link to normal Racket documentation, and currently redirect those to the main
racket-lang documentation using --redirect-main "https://docs.racket-lang.org".
But I also link to a private library, and would like to redirect references to
this library's documentation to a separate URL.

Ideally, I would do this by declaring the root URL for the package, and not by
manually annotating every usage of @racket[private-library-identifier].

Is this possible?

--
William J. Bowman

Matthew Flatt

unread,
Oct 7, 2020, 9:24:43 AM10/7/20
to William J. Bowman, Racket Users
As you've no doubt concluded by now, there's not really a way to do
this. It must be technically possible to override methods of the HTML
renderer to make this happen, but it wouldn't be practical.

I'm not sure what a good interface would be for more fine-grained
configuration. If it's worth it to you to look at how HTML renderer
might better support this, look for places in `scribble/html-render`
that use `external-root-url`, since that's what `--redirect-main` turns
into.


Matthew

William J. Bowman

unread,
Oct 8, 2020, 4:17:11 PM10/8/20
to Matthew Flatt, Racket Users
Thanks! I'll take a look and see if I can figure out a decent interface.

I'm considering two alternatives:
1. put the package on the package server and tell people not to rely on it.
2. put a a copy of the Racket documentation on my course website and just
redirect everything to that.

(1) is probably the best idea, particularly since I can separately publish the
docs without the code.

--
William J. Bowman
Reply all
Reply to author
Forward
0 new messages