-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to change root path during build. #1013
Comments
Hmm. How are you building the notebooks in Juno such that you're getting a different working directory? Are you just doing Would an at-setup block in each |
Yes, exactly that. Happy to have a different procedure though - this is going to be a manual, not an automated process.
Yeah, I thought about this. It's a little messy, but if it works... I was thinking of something simple like
In the first code block of each notebook. Is there a better option? |
Actually, that doesn't seem to work - during the build, |
Yes, but most importantly you need to |
But I also tried something a bit more cloodgy and it didn't work either. I can't seem to get out of the build directory no mater what:
|
@fredrikekre Sorry - missed your comment because my other comment is staying at the bottom of the thread for some reason... |
@fredrikekre Your suggestion allows the code to evaluate, but still doesn't let me out of the build directory:
|
The problem is that we Documenter.jl/src/Expanders.jl Line 543 in 38dc754
You can probably workaround it with
|
That would have to wrap every code block right? Might be too heavy-handed for me. Would there be any interest in a PR that allows this to be user specified? Eg something like makdocs(
...
eval_dir=:build # or user-specified path
) ? |
Yes, I think we could have an option like that. Bikeshed: maybe call it One thing to think about though: currently, if I am not mistaken, we Another idea would be to have a per-file at-meta block option for this? |
Agree - that's much clearer :-)
I like this idea. Would this be instead of or in addition to an argument in I can dig around in the source code to get started on a PR, but is there a good place to start to understand the processing pipeline? I read through the contributing page, and my plan was to start here at the source for |
Assuming a standard project layout,
I'd like to be able to set an option such that
makedocs()
will execute code inMyPackage/docs/src/01-foo.md
as if the current working directory isMyPackage/
.I tried
thinking that the
root
option was what I wanted, butpwd()
in a code block returnsMyProject/build/
. I also tried setting thebuild="."
... oops #1012The reason for this desire is that I'm using the markdown files as interactive data analysis notebooks with Juno, and Juno sets the current working directory as the package root. I'd like to use Documenter to render html versions of the analysis notebooks, but would prefer not to go through and change all of the paths to the input data and output folders.
Is this possible, even with some sort of hacky solution? I'm happy to work on a PR if I this would be useful for others, and if I can get a bit of direction about where to start.
The text was updated successfully, but these errors were encountered: