Open sorawee opened 10 months ago
tl;dr: generated href could be inconsistent depending on several factors. Here are some of the possible values:
<a href="file:///Users/sorawee/playground/test/scribblings/test.html#%28part._foo%29" class="tocviewlink" data-pltdoc="x">foo</a>
<a href="test.html#%28part._foo%29" class="tocviewlink" data-pltdoc="x">foo</a>
<a href="#%28part._foo%29" class="tocviewlink" data-pltdoc="x">foo</a>
The second and third variation seem OK, but the first variation contains an absolute path, which is not portable to other systems.
Consider test/scribblings/test.scrbl
test/scribblings/test.scrbl
#lang scribble/base @section{foo} foo content
Make sure to install test as a package with the following info.rkt:
test
info.rkt
#lang info (define collection "test") (define scribblings '(("scribblings/test.scrbl" ())))
Then, in the directory test/scribblings, run scribble +m test.scrbl.
test/scribblings
scribble +m test.scrbl
The generated HTML contains:
Now, run scribble +m --dest . test.scrbl.
scribble +m --dest . test.scrbl
Now, run raco pkg remove test and re-run scribble +m test.scrbl.
raco pkg remove test
tl;dr: generated href could be inconsistent depending on several factors. Here are some of the possible values:
<a href="file:///Users/sorawee/playground/test/scribblings/test.html#%28part._foo%29" class="tocviewlink" data-pltdoc="x">foo</a>
<a href="test.html#%28part._foo%29" class="tocviewlink" data-pltdoc="x">foo</a>
<a href="#%28part._foo%29" class="tocviewlink" data-pltdoc="x">foo</a>
The second and third variation seem OK, but the first variation contains an absolute path, which is not portable to other systems.
First variation
Consider
test/scribblings/test.scrbl
Make sure to install
test
as a package with the followinginfo.rkt
:Then, in the directory
test/scribblings
, runscribble +m test.scrbl
.The generated HTML contains:
Second variation
Now, run
scribble +m --dest . test.scrbl
.The generated HTML contains:
Third variation
Now, run
raco pkg remove test
and re-runscribble +m test.scrbl
.The generated HTML contains: