Comments (6)
I checked the version of yadm
and I found it was old.
$ yadm version
yadm 3.1.1
When I upgrade yadm to the latest version, everything worked fine. Thank you for your support.
from yadm.
In https://yadm.io/docs/templates it says
If multiple classes are defined, yadm.class=="someclass" will be true if any of the defined classes are “someclass”.
Please try that, and let us know your results.
from yadm.
The classes are mango
and peach
:
$ yadm config --get-all local.class
mango
peach
In the test##template
, I've written:
{% if yadm.class=="mango" %}
mango
{% endif %}
{% if yadm.class=="peach" %}
peach
{% endif %}
However, the content of 'test' only became:
peach
It appears it only checks the result of yadm config local.class
.
from yadm.
@piny940 Can you try
{% if yadm.classes=="mango" %}
mango
{% endif %}
{% if yadm.classes=="peach" %}
peach
{% endif %}
Perhaps the doc is wrong on the syntax.
from yadm.
Unfortunatlly, it didn't work. The content of test
became empty.
from yadm.
I've written test##template
as follows:
{% if yadm.classes=="mango" %}
mango
{% endif %}
{% if yadm.classes=="peach" %}
peach
{% endif %}
Variables:
{{ yadm.class }}
{{ yadm.classes }}
Then the content of test
became:
Variables:
peach
{{ yadm.classes }}
It appears yadm.classes
does not work in template file.
from yadm.
Related Issues (20)
- Bash completions not working without git from homebrew HOT 2
- YADM pushes to Github using the wrong user credentials? HOT 2
- How can I resolve conflicting files HOT 3
- Release the Fedora 38 repos on openSUSE Build Service HOT 1
- Alt files shoudn't be tracked
- yadm.io is down. HOT 2
- yadm not applying git filter HOT 2
- Deleting symlinks when run under sudo HOT 3
- Fedora 39 repo HOT 2
- document how to check if a variable is unset HOT 2
- linux file being linked on darwin HOT 2
- Checkout files to $HOME worktree not working HOT 8
- Author identity unknown after setting the identity HOT 2
- vim tty bootstrap HOT 2
- Encryption, Secrets and Password Management Roadmap HOT 1
- Fedora 40 repo HOT 1
- env substitutions not occuring with default template processor HOT 2
- Makefile does not install completions
- Env variables don't work in if-else-endif templates HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yadm.