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

Access config/env variables in yaml front matter #17

Closed
xy2z opened this issue Jul 31, 2023 · 0 comments
Closed

Access config/env variables in yaml front matter #17

xy2z opened this issue Jul 31, 2023 · 0 comments

Comments

@xy2z
Copy link
Owner

xy2z commented Jul 31, 2023

Nice to have.

It can be useful to set view's yaml-front-matter to variables from config/.env file.
eg. to disable build on production (for drafts)

core.disable_build: ${{ config('app.is_production') }}

Probably best to use the same replacement as github action does ${{ like.this }} - as others are using this so this is what people are used to. The eval the content as raw php, so it can be used for config, env, and other things, eg. ${{ env('foo') }}.

xy2z added a commit that referenced this issue Aug 8, 2023
@xy2z xy2z closed this as completed Aug 8, 2023
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

No branches or pull requests

1 participant