At Mon, 4 Jan 2016 10:11:01 -0800 (PST), Matthew Butterick wrote:
> Perhaps related, but probably not: links to text files that work in a local
> installation, do not work on pkg-build (I'm supposing due to an htaccess
> restriction)
>
> For instance, this:
>
> http://pkg-build.racket-lang.org/home/racket/build-pkgs/user/.racket/6.3/pkgs/a
> oc-racket/day2-input.txt
>
> Should get you this:
>
> https://raw.githubusercontent.com/mbutterick/aoc-racket/master/day2-input.txt
The problem is that the package is built in a different place than
where the package is installed, and so the text file doesn't get
carried along with the documentation. (That is, you've used
`define-runtime-path` to refer to the file at its run-time location for
the document, but the run time of a document is not the same as the
time when a document is read by a human, and the locations of those two
times can be different.)
Instead of using `link` with the document-run-time path, use a
`link-resource` property:
(require scribble/html-properties
scribble/core)
(define (link-rp path . text-args)
(element (style #f (list (link-resource path)))
text-args))
As a simplification, this `link-rp` takes a relative path. That works
(instead of using `define-runtime-path`) because documentation is
always rendered with its enclosing documentation as the relative path.
Probably, something like `link-rp` belongs in `scribble/base`, since
`link-resource` is difficult to find and use.
--
You received this message because you are subscribed to the Google Groups
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-dev/20160104184123.5287A65005A%40mail-svr1.cs.utah.edu.
For more options, visit https://groups.google.com/d/optout.