### Bug description

From #2865, it appears variables stored in `_variables.yml` can only be accessed if a `_quarto.yml` file exists (it can be empty).

The code below produces the following HTML:
<img width="574" alt="image" src="https://user-images.githubusercontent.com/8896044/196536859-4cace025-2dbe-4c44-9154-78b54aa73d3e.png">

While adding an empty `_quarto.yml` produces the following:
<img width="574" alt="image" src="https://user-images.githubusercontent.com/8896044/196537030-3653b619-ac16-49ae-b91f-de37e277463d.png">

The documentation does not really says it's required to have a `_quarto.yml` file (<https://quarto.org/docs/authoring/variables.html#var>) and I would not expect this to be a requirement.

- Quarto document:

  ````
  ---
  title: "title"
  categories:
    - "{{< var kws.k1 >}}"
    - "{{< var kws.k2 >}}"
  abc: def
  ---
  
  # Header 1
  
  Reading {{< var kws.k1 >}} works!
  ````

- `_variables.yml`
  ```
  kws:
    k1: keyword1
    k2: keyword2
    k3: keyword3
  ```

---

Quarto: v1.2.210
OS: MacOS 12
Arch: Apple Silicon
IDE: VSCode

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-10-18T20:30:02Z
mcanouil
documentation
v1.2
closed
`_variables.yml` only works if `_quarto.yml` exists
https://github.com/quarto-dev/quarto-cli/issues/2918