Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a conditional helper for checking quarto profile value #2216

Open
cderv opened this issue Feb 4, 2023 · 0 comments
Open

Add a conditional helper for checking quarto profile value #2216

cderv opened this issue Feb 4, 2023 · 0 comments
Assignees
Labels
feature Feature requests

Comments

@cderv
Copy link
Collaborator

cderv commented Feb 4, 2023

For quarto document, some conditional content can be made on profile value. When a profile is activated QUARTO_PROFILE env var is set. https://quarto.org/docs/projects/profiles.html#overview

It would be interesting to have a helper function like for output format (is_html_output()) to test profile value

This would allow conditional chunk based on quarto profile value.

It is easy to do eval = Sys.getenv("QUARTO_PROFILE") == "profile name" but we could offer a nice shorter version.

We could either have a is_profile("profile name") that would be true on specific profile. Or another name more namespaced (quarto_profile() ? is_quarto_profile() ? when_quarto_profile() ? )

@cderv cderv added the feature Feature requests label Feb 4, 2023
@cderv cderv self-assigned this Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

1 participant