We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
default
First, thanks for sigil. I prefer it already to envsubst and shell evaluation.
envsubst
% print "{{ \$x | default \"foo\" }}" | tee template {{ $x | default "foo" }}
This did not behave as I expected:
% sigil -f template template: template:1: undefined variable "$x"
Interestingly, in this case, the default works:
% sigil -f template x= foo
Regular behavior, of course, is fine:
% sigil -f template x=bar bar
I'm using sigil 0.6.0 on macOS.
Now, after reading how Hugo does templating, I tried using $.x instead of $x, and...
$.x
$x
% print "{{ \$.x | default \"foo\" }}" | tee template {{ $.x | default "foo" }} % sigil -f template foo
Ok, this is the result I wanted, but it took a lot of horsing around.
At the least, I'd suggest more documentation.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
First, thanks for sigil. I prefer it already to
envsubst
and shell evaluation.This did not behave as I expected:
Interestingly, in this case, the default works:
Regular behavior, of course, is fine:
I'm using sigil 0.6.0 on macOS.
Now, after reading how Hugo does templating, I tried using
$.x
instead of$x
, and...Ok, this is the result I wanted, but it took a lot of horsing around.
At the least, I'd suggest more documentation.
The text was updated successfully, but these errors were encountered: