Skip to content
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 note on where _extensions needs to go #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bob-carpenter
Copy link

This solves #6 for me. There may be a more general set of instructions, but I updated the README.md with what worked on my machine.

Thanks!

@cderv
Copy link
Contributor

cderv commented Jun 12, 2023

We could add this for sure, but what I want to clarify is that

quarto add quarto-ext/include-code-files

should have put the _extensions folder in the right place.

It wasn't the case ?

@bob-carpenter
Copy link
Author

I don't know what the right place is, but quarto add put the _extensions folder in the directory from which quarto add was called. Once I moved _extensions to the directory containing my .qmd file, it worked.

I was expecting it to install somewhere quarto-wide rather than for this specific doc. In retrospect, this is good because I want to distribute the extension along with my doc and it's small enough I can do that easily.

@dragonstyle
Copy link

It will install either to the current directory, or if within a Quarto project, to the project root (making it available to any file within that project).

@bob-carpenter
Copy link
Author

My project is organized <root>/quarto/*.qmd and <root>/stan/*.stan and I run quarto from the root using a <root>/makefile. When I was in the <root> directory and ran quarto add, it created <root>/_extensions which didn't work. Moving _extensions into <root>/quarto/_extensions let me compile.

@dragonstyle
Copy link

Yes, it is by design that add installs into either the working directory to project root. Extensions are resolved using either the document directory or the project root. I think it would be useful to include this information in our extension documentation on quarto.org (I didn't see it doing a quick peruse). I am mainly adding this note to clarify that it isn't actually correct that the _extension directory needs to be in the same directory as your input document- that is true when it is not a project, but when using Quarto projects, it can also be the project root.

I'd rather see this type of documentation in our core documentation so all extensions may share them without taking on the burden of keeping things up to date...

@bob-carpenter
Copy link
Author

bob-carpenter commented Jun 12, 2023

Thanks, @dragonstyle --- that sounds good. It'd be nice if there were a link somewhere from the README.md to the general instructions that explained that quarto add doesn't work like pip install and you have to run the command from the appropriate directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants