feat(cli): auto-detect quarto website projects during init#108
Open
feat(cli): auto-detect quarto website projects during init#108
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ricochet initnow auto-detects quarto website projects and configures the correct static output directory.Problem
When deploying a quarto website project, the
output_dirin_ricochet.tomlhad to be manually set to include the_sitesubdirectory (e.g.,docs/_siteinstead ofdocs).Quarto website projects render to
_site/by default, butricochet initdidn't know about this and would prompt the user to pick a directory manually.Changes
_quarto.ymlin the entrypoint's directory. Iftype: website, auto-configure static settings with the correct output directory (_siteby default, oroutput-dirfrom_quarto.yml)._quarto.ymlas entrypoint: Add_quarto.ymlas a selectable entrypoint for quarto content types, since website and book projects use it as their entry point.docs/index.qmdwith quarto website config correctly producesdocs/_site.