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 a helper to compute a path for a quarto project root #180

Open
cderv opened this issue May 15, 2024 · 0 comments
Open

Add a helper to compute a path for a quarto project root #180

cderv opened this issue May 15, 2024 · 0 comments

Comments

@cderv
Copy link
Collaborator

cderv commented May 15, 2024

Related to discussion at quarto-dev/quarto-cli#9649

Project root should be accessible in QUARTO_PROJECT_ROOT env var. So we could use this information to build a path

Something like

```{r}
#| label: embedme
readLines(xfun::from_root('data.txt', root = Sys.getenv("QUARTO_PROJECT_DIR")))
```

Though maybe this is just documentation recipe topic has latest here 📦 has a new mechanism quite simple

```{r}
#| include: false
here::i_am("assets/embed.qmd")
```

```{r}
#| label: embedme
readLines(here::here('data.txt'))
```
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

No branches or pull requests

1 participant