### Bug description

 I observe some unexpected behaviour when trying to use quarto project profiles: while the content in the body (defined with `:::{.content-visible when-profile="advanced"} ... :::` is correctly shown or hidden, the title and output-dir that should change are ignored. 

I've set up a project with: 

`quarto create-project test-proj`

and added the following files following [the steps here](https://quarto.org/docs/projects/profiles.html#profile-configuration): 

<details><summary> test-proj.qmd </summary>

```
## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.


:::{.content-visible when-profile="advanced"}

## only in advanced 
Some text
:::
```
</details>

<details><summary> _quarto.yml </summary>

```
project:
  title: "my website"
  type: website
```

</details>

<details><summary> _quarto_advanced.yml </summary>

```
project:
  title: "My Website (Advanced)"
  output-dir: _site-advanced
```

</details>

Observation:

- using `quarto render` creates a subdirectory `_site` with `test-proj.html` and the title "my website" with the correct content in body

- using `quarto render --profile advanced` overwrites test-proj.html in the `_site` subdirectory and keeps the old title "my website" (unexpected) - but the content in the body (## only in advanced - Some text) is shown as expected

Thus somehow the `output-dir:`and the `title`is not being used from the `_quarto-advanced.yml ` - I am not sure if this is a bug or if I am not applying it correctly - thanks

<details> <summary> Sessioninfo & quarto check </summary>

RStudio: 2022.07.0 Build 548
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

```
[✓] Checking Quarto installation......OK
      Version: 1.2.210
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.5
      Path: /usr/local/opt/python@3.9/bin/python3.9
      Jupyter: 4.7.1
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.1
      Path: /Library/Frameworks/R.framework/Versions/4.2/Resources
      LibPaths:
        - /Users/cb/Library/R/4.0/library
        - /Library/Frameworks/R.framework/Versions/4.2/Resources/library
      rmarkdown: (None)

      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")
```

</details>



### 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.
jjallaire
2022-10-13T18:48:24Z
cathblatter
bug needs-discussion
closed
Project profiles ignoring output-dir in _quarto-advanced.yml
https://github.com/quarto-dev/quarto-cli/issues/2840