Skip to content

Commit

Permalink
Merge pull request #1145 from quarto-dev/advanced-docs
Browse files Browse the repository at this point in the history
Advanced Docs Landing Page
  • Loading branch information
cwickham authored Jun 13, 2024
2 parents 59f5bfa + ceed077 commit de3e9da
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
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

0 comments on commit de3e9da

Please sign in to comment.