I am using jinj2 inside markdown files to create a documentation template via Mkdocs.
The whole process is created through a pipeline so I get to see what is done by the jinja2 code I write inside my templates, but there is that one particular problem that is blocking me right now:
let's say that I have template1.md and template2.md and one var file that is called file2.yml
the vars that are inside file2.yml are the cars that are included in the template2.yml and its content is similar to this :
squads:
- name: squad_name
mail: squad@mail.com
env_responsiblity: test
on template2.md and after the processing of the jinja2 command the fields are correctly filled so that's ok so far.
what I want is to call the env_responsibility value inside my second template1.md like this :
{% import 'template2.md' as t %}
#{{environement}}
##Responsibility
{% if environement = t.env_responsibility %}
The environement {{environement}} is under the responsability of the {{t.squad.name}}
{% endif }%
the sure thing is that the call of squad name and env_responsibility is not working but I have no error that could point what is wrong.
Could someone please help to highlight the issue?