Closed adamslc closed 11 months ago
Sorry, I'm not very positive about merging this.
My old memory says it's a bit delicate to modify the path. It could possibly break the existing workflows. I had a hard time computing the path so my "solution" is to use abspath
everywhere and to use relpath
to compute the relative path.
Could relpath
meets the need here?
Some more information: the issue arrises when doing makedemos(../examples)
, which results in a absolute path that looks like
/home/user/.julia/dev/Package/examples/section/subsection/card.md
The trouble then arrises in get_build_file
, where we are trying to construct the path
/home/user/.julia/dev/Package/docs/build/examples/section/subsection/card.md
using only the source path, and the source dir ../examples
. I don't believe that there is a way to go from one path to the other in general. Maybe there could be an additional kwarg for makedemos
that defaults to the current behavior, and allows the use of relative paths?
Maybe there could be an additional kwarg for makedemos that defaults to the current behavior, and allows the use of relative paths?
This seems a bit tricky to me...
The generate
function has two keywords build
and root
, would them be useful to parse and reconstruct the paths?
I believe that this new commit should work. It passes the package tests
locally, and it also sucessfully builds the docs for me locally with a
package that uses makedemos("../examples")
.
I didn't double-check the path calculation; it just looks like what I would write myself. Thanks for the updates.
This was causing the postprocess function to crash when trying to compute the corresponding build dir because the '..' a relative path is lost when making the path absolute.