Skip to content

_quarto.yml files in non-website Quarto projects are not initially selected, or even available, in the Publish wizard #10995

Closed

Description

@toph-allen

System details

RStudio Edition : Desktop
RStudio Version : 2022.06.0 Build 305
OS Version      : macOS 12.3
R Version       : 3.6.3, but this issue also occurs on 4.*

Steps to reproduce the problem

  1. Create a new Quarto project — just an ordinary project, not a website. The default Quarto project in the IDE includes name-of-quarto-project.qmd and _quarto.yml.
  2. Click the Publish button, select RStudio Connect (maybe optional), and select "Publish document with source code"

Describe the problem in detail

The _quarto.yml file should be selected — it contains project-level metadata. However, it's not even visible in the file pane.

To add it, I have to click "Add More…" and select it, at which point the .qmd file is modified to add it as a resource_file.

Describe the behavior you expected

A _quarto.yml file should always be included in Quarto deployments if it is present in the project directory.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • [NA] If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. ronblum commented on Apr 19, 2022

    @ronblum
    Contributor

    @toph-allen Thank you for raising this! I can reproduce this in 2022.02.1 as well. However, it looks like this isn't specific to Quarto—the same thing happens in other project types for files beginning with _ (underscore). I'll mark this for review as part of our ongoing development of RStudio.

    Note: Tagging this with the quarto label because of the impact this has on Quarto projects, even though they're not the cause.

  2. toph-allen commented on Apr 19, 2022

    @toph-allen
    Author

    @ronblum Yeah, the quarto tag makes sense -- I'm not sure what the expected behavior is for other types of project files beginning with _, but for Quarto, including the project file is expected.

  3. self-assigned this
    on May 25, 2022
  4. removed their assignment
    on May 25, 2022
  5. ronblum commented on Jun 2, 2022

    @ronblum
    Contributor

    I'm a little uncertain about _quarto.yml in subdirectories, based on the conversation in PR #11201. Should they always be included? I tried with _metadata.yml at the root and quarto.yml in a subdirectory. The metadata YAML gets pick up, but not the Quarto one.

  6. ronblum commented on Jun 2, 2022

    @ronblum
    Contributor

    Question for @romainfrancois (I forgot to tag you).

  7. romainfrancois commented on Jun 6, 2022

    @romainfrancois
    Contributor

    I'm not sure. I think _quarto.yml should be unique, and identifies the quarto project, whereas there can be _metadata.yml files in sub directories of the project. But I don't know enough about quarto to be sure.

  8. jthomasmock commented on Jun 6, 2022

    @jthomasmock
    Contributor

    https://quarto.org/docs/projects/quarto-projects.html#shared-metadata

    Any document rendered within the project directory will automatically inherit the metadata defined at the project level.

    Note that the project file contains both global options that apply to all formats (e.g. toc and bibliography) as well as format-specific options.

    You can include additional metadata linked via metadata-files and provide per-directory options by adding a _metadata.yml file to any sub-directory of your project. Options provided within these files use the same schema as _quarto.yml, and are merged with any options you’ve already provided in _quarto.yml.

    My understanding is that _quarto.yml should be unique and in the home directory of the project - affect global project. _metadata.yml can be added to specific sub-directories and affect that sub-directory only.

  9. ronblum commented on Jun 6, 2022

    @ronblum
    Contributor

    @jthomasmock Thank you for the reference and explanation!

    Simple way to verify the _metadata.yml behavior:

    1. Create a Quarto Blog project.
    2. Render the website in the Build Pane using "Render Website."
    3. Publish the website, choosing "Publish website with source code."
      • One of the files that gets picked up is posts/_metadata.yml
  10. romainfrancois commented on Jun 7, 2022

    @romainfrancois
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions