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

Advanced Docs Landing Page #1145

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions docs/advanced/environment-vars.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: "Environment Variables"
summary: Environment variables Quarto inspects and sets
format: html
draft: true
---

## Variables Quarto inspects

These are variables that you can set to control how Quarto renders documents. For example, you can set them explicitly before running `quarto render`:

``` {.bash filename="Terminal"}
export QUARTO_R=/opt/R/4.2.3/bin
quarto render
```

You can read about other ways to set environment variables in Quarto Projects in [Environment Variables](/docs/projects/environment.qmd).

| Variable | Description |
|-----------------|-------------|
| `QUARTO_R` | |
| `QUARTO_PYTHON` | |
| | |

## Variables Quarto sets

These variables are set by Quarto you can query them. For example, you can query them in an executable code cell:

::: panel-tabset
## R

``` r
Sys.getenv("QUARTO_DOCUMENT_PATH")
```

## Python

``` python
import os
print(os.environ["QUARTO_DOCUMENT_PATH"])
```

## Julia

``` julia
ENV["QUARTO_DOCUMENT_PATH"]
```
:::

| Variable | Description |
|----------------|--------------------------------------------------------|
| `QUARTO_PROJECT_ROOT` | Root of the project, or the directory of the file if not in project mode |
| `QUARTO_DOCUMENT_PATH` | Directory of the document being rendered |
| `QUARTO_PROFILE` | Profile used, e.g `QUARTO_PROFILE=advanced,production` for `quarto render --profile advanced,production` |
| `QUARTO_FIG_WIDTH` and `QUARTO_FIG_HEIGHT` | Values for `fig-width` and `fig-height` as set in the document metadata |
12 changes: 12 additions & 0 deletions docs/advanced/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "Advanced User Documentation"
format: html
search: false
listing:
type: table
fields: [title, summary]
field-display-names:
summary: Summary
---

Topics on this page may be of interest to advanced users of Quarto.
1 change: 1 addition & 0 deletions docs/advanced/jupyter/kernel-execution.qmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Jupyter Kernel Execution
format: html
summary: How to support Quarto from a Jupyter kernel
---

Quarto executes Jupyter notebooks using [`nbclient`](https://github.com/jupyter/nbclient) together with a few additional options
Expand Down