Closed SuzanneSoy closed 3 years ago
This enables the automatic linking to the source of the document. If you click the title of the document, it includes a link to the source of the document. That source is computed by looking up the package info from the package server, by requesting that JSON file.
Note that everything works fine even if that network request fails, it just won't show the link.
Can't this be burned into the HTML file when the scribble file is compiled?
That information is usually not available when the HTML is generated -- for example, if you install from a catalog that isn't pkgs.racket-lang.org
or if you don't have network access available, both of which are true for pkg-build.racket-lang.org
which is what generates the docs on docs.racket-lang.org.
If you want to try implementing this in a different way, I'd be happy to look at that or provide advice, but I don't immediately have other suggestions on-hand.
I see. I'll close this then :)
The network tab of my browser shows that when the documentation for a locally-installed package is loaded, it accesses https://pkgs.racket-lang.org/pkg/.json (e.g. the docs for
anaphoric
atfile:///home/suzanne/.local/share/racket/8.0/pkgs/anaphoric/doc/anaphoric/index.html
accesshttps://pkgs.racket-lang.org/pkg/anaphoric.json
).Local documentation should work 100% offline and shouldn't attempt to make network requests.