Skip to content

feat(cli): auto-detect quarto website projects during init#108

Open
pat-s wants to merge 1 commit intomainfrom
feat/quarto-website-detection
Open

feat(cli): auto-detect quarto website projects during init#108
pat-s wants to merge 1 commit intomainfrom
feat/quarto-website-detection

Conversation

@pat-s
Copy link
Copy Markdown
Member

@pat-s pat-s commented Mar 22, 2026

Summary

ricochet init now auto-detects quarto website projects and configures the correct static output directory.

Problem

When deploying a quarto website project, the output_dir in _ricochet.toml had to be manually set to include the _site subdirectory (e.g., docs/_site instead of docs).
Quarto website projects render to _site/ by default, but ricochet init didn't know about this and would prompt the user to pick a directory manually.

Changes

  • Quarto website detection: When content type is quarto-r/jl/py, check for _quarto.yml in the entrypoint's directory. If type: website, auto-configure static settings with the correct output directory (_site by default, or output-dir from _quarto.yml).
  • _quarto.yml as entrypoint: Add _quarto.yml as a selectable entrypoint for quarto content types, since website and book projects use it as their entry point.
  • Relative path resolution: The output directory is resolved relative to the entrypoint's parent, so docs/index.qmd with quarto website config correctly produces docs/_site.

When the content type is quarto-r, quarto-jl, or quarto-py, `ricochet init` now checks for a `_quarto.yml` file.
If the project type is `website`, the static settings are auto-configured with the correct output directory (`_site` by default, or `output-dir` from `_quarto.yml`).

The output directory is resolved relative to the entrypoint's parent directory, so `docs/index.qmd` with a `_quarto.yml` in `docs/` correctly produces `docs/_site` as the output path.

Also adds `_quarto.yml` as an entrypoint option for quarto content types, since website and book projects use the YAML config as their entry point rather than a single `.qmd` file.
@pat-s pat-s requested a review from JosiahParry March 26, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant