### Bug description

This is on `nbdev` side and I meant to post it [there](https://github.com/fastai/nbdev/issues/1020), not here (late night brainfart).  Feel free to close.

I edited `_quarto.yml` file to change a CSS theme:

```
format:
  html:
    page-layout: article
    theme:
      light: flatly
      dark: darkly
    css: styles.css
    toc: true
    toc-depth: 4
```

Ran `nbdev_docs` and `_quarto.yml` was reverted to the original state:
```
format:
  html:
    theme: cosmo
    css: styles.css
    toc: true
    toc-depth: 4
```


Apologies if I overlooked an obvious setting that drives this behavior.  Otherwise, seems like this should not be happening.

Thanks!

## System
```
In [3]: nbdev.__version__
Out[3]: '2.3.0'
```
```
quarto check

[✓] Checking Quarto installation......OK
      Version: 1.1.189
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.6
```

### 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.
- [ ] 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.
2022-09-08T06:34:44Z
liquidcarbon
bug
closed
Quarto config file is changed by nbdev_docs
https://github.com/quarto-dev/quarto-cli/issues/2348