/
Quarkdown can read environment variables from the host system at compile time, allowing documents to adapt their content based on the environment they are compiled in.
.env {name} docs ↗ returns the value of the environment variable with the given name, or none if it is not set.
This page was compiled with .env {SHELL} as the default shell.This page was compiled with /bin/bash as the default shell.
Since the result may be none, you can use optionality functions to handle missing values:
.container background:{.env {COLOR}::otherwise {teal}}
Hello, world!Hello, world!
Reading environment variables requires the process permission.
quarkdown c main.qd --allow process