quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.9k stars 322 forks source link

VS-Code plugin ignores _quarto.yml #8099

Closed roland-KA closed 10 months ago

roland-KA commented 10 months ago

Bug description

I have a Quarto project consisting currently only of a few files:

For editing I'm using VS Code with the Quarto extension.

When I have the file Intro.qmd open for editing in VS Code and I click "preview", Quarto just renders this file, ignoring the definitions in _quarto.yml (thus also ignoring lecture.css which is referenced in _quarto.yml as a theme for Revealjs.

There is another strange behaviour I noticed: When doing quarto render --to revealjs on the command line within that project, the preview window in VS Code changes it contents and shows a correctly rendered version of Intro.qmd.

Expected behavior

I have another (bigger) project with the same settings. In that environment VS Code preview works as expected (i.e. it processes also _quarto.yml).

Actual behavior

see above

Your environment

Quarto check output

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.450
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.8 (Conda)
      Path: /Users/roland/.julia/conda/3/bin/python3
      Jupyter: 5.2.0
      Kernels: julia-1.8, python3

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

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
mcanouil commented 10 months ago

This repository is for Quarto CLI. For VSCode extension: https://github.com/quarto-dev/quarto

Note that you did not provide the steps and a complete self-contained example for us to attempt to reproduce your issue.

roland-KA commented 10 months ago

Thank you for your feedback!

When trying to make a minimal example, I found the cause of the problem. The description above is a bit simplified. The name of the Quarto file is not Intro.qmd, but DB - Intro.qmd.

As soon as I deleted the spaces within the filename (changing it to DB-Intro.qmd or just to Intro.qmd) everything worked fine. It's a bit strange, but now it works 🤷‍♂️.

cscheid commented 10 months ago

@roland-KA Thanks for the clarification. If you create a minimal, full example with the DB - Intro.qmd file causing issues, I encourage you to create a new issue. It seems like it could be a Quarto bug!

roland-KA commented 10 months ago

I've tried to reproduce the situation with a minimal example. But up to now I didn't succeed any more. There must have been an additional aspect causing the problem.

I will have a look at the situation when I create my next Quarto project. If it occurs again, I will create an issue with a reproducible example.