Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

templates

How to pass selected, named arguments to Jinja2’s include context?

January 13, 2023 by Tarik

Jinja2 has an extension that enables the with keyword – it won’t give you the same syntax as Django, and it may not work the way you anticipate but you could do this: {% with articles=articles_list1 %} {% include “list.html” %} {% endwith %} {% with articles=articles_list2 %} {% include “list.html” %} {% endwith %} … Read more

Categories templates Tags jinja2, templates Leave a comment

How to escape liquid template tags?

January 6, 2023 by Tarik

it is possible to disable liquid processing engine using the raw tag: {% raw %} {% this %} {% endraw %} will display {% this %}

Categories templates Tags liquid, templates Leave a comment

How to set dynamic values with Kubernetes yaml file

January 5, 2023 by Tarik

You can also use envsubst when deploying. e.g. cat app/deployment.yaml | envsubst | kubectl apply … It will replace all variables in the file with their values. We are successfully using this approach on our CI when deploying to multiple environments, also to inject the CI_TAG etc into the deployments.

Categories templates Tags config, key-value, kubernetes, templates, yaml Leave a comment

What’s the advantage of Logic-less template (such as mustache)?

December 28, 2022 by Tarik

In other words, it prevents you from shooting yourself in the foot. In the old JSP days, it was very common to have JSP files sprinkled with Java code, which made refactoring much harder, since you had your code scattered. If you prevent logic in templates by design (like mustache does), you will be obliged … Read more

Categories templates Tags mustache, templates Leave a comment
Newer posts
← Previous Page1 … Page4 Page5

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa