[racket] How to generate relative links in Scribble documentation that points to docs.racket-lang.org

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Feb 11 11:01:07 EST 2014

I think you're ending up with "file://..." URLs because you're
rendering to a destination that is within a collection. That seems to
trigger a special handling of paths that `--dest .` disables. I'll have
to investigate more at some point, but it's probably a good idea to
render to outside your package directory.

Meanwhile, you only need to generate ".sxref" files if you're rendering
multiple documents separately. It looks like you just have a single
document here, so isn't

 scribble +m --redirect-main "http://docs.racket-lang.org" metapict.scrbl

enough?


At Tue, 11 Feb 2014 09:22:21 +0100, Jens Axel Søgaard wrote:
> Thanks, --dest .  worked as a charm.
> 
> /Jens Axel
> 
> 
> 2014-02-11 7:06 GMT+01:00 Stephen Chang <stchang at ccs.neu.edu>:
> > Adding a "--dest ." seems to do the trick?
> >
> > So the full command I used is:
> >
> > scribble --html ++info-in all.sxref +m --redirect-main
> > http://docs.racket-lang.org --dest . metapict.scrbl
> >
> > On Mon, Feb 10, 2014 at 6:03 PM, Jens Axel Søgaard
> > <jensaxel at soegaard.net> wrote:
> >> Hi All,
> >>
> >> I am attempting to generate documentation for MetaPict using Scribble.
> >>
> >> First cross reference information is collected:
> >>
> >>     scribble --info-out all.sxref *scrbl
> >>
> >> Then the documentation is built with references to
> >> docs.racket-lang.org like this:
> >>
> >>     scribble --html ++info-in all.sxref ++xref-in setup/xref
> >> load-collections-xref --redirect-main "http://docs.racket-lang.org"
> >> metapict.scrbl
> >>
> >> The problem is that links internally all end up referring to
> >> /Users/soegard/... rather than
> >> being relative.
> >>
> >> What am I missing?
> >>
> >> The docs:
> >> http://soegaard.github.io/docs/metapict/metapict.html
> >> The scribble source:
> >> 
> https://github.com/soegaard/metapict/blob/master/metapict/scribblings/metapict.
> scrbl
> >>
> >> --
> >> Jens Axel Søgaard
> >>
> >> ____________________
> >>   Racket Users list:
> >>   http://lists.racket-lang.org/users
> 
> 
> 
> -- 
> --
> Jens Axel Søgaard
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users


Posted on the users mailing list.