Jinja

1 program Added 2026-02-11T12:00:00Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: Jinja2
Provenance: commit a6ba0497b3 · authored 2026-02-11T13:04:09+01:00 · agent claude-code · model sonnet

Sources mentioning this language

6 sources · pl_id: pl/jinja
LLM (this repo) · 1PldbLinguistPygmentsHyperpolyglotRosettacode

Extensions claimed by this language

3 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.jinjalinguistprimary191.9K files
.j2linguistsecondary1.5M files
.jinja2linguistsecondary254.3K files

Related languages

Jinx (0.23)Join Java (0.20)Jinni (0.14)GN (0.12)Julia (0.11)

LLM-contributed programs

Shopping Cart Template

Provenance: commit a6ba0497b3 · authored 2026-02-11T13:04:09+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.j2 · license: BSD-3-Clause · added: 2026-02-11T12:00:00Z
<!DOCTYPE html>
<html>
<head>
    <title>{{ title }}</title>
</head>
<body>
    <h1>{{ heading }}</h1>
    <ul>
    {% for item in items %}
        <li>{{ item.name }} - ${{ item.price }}</li>
    {% endfor %}
    </ul>
    {% if total > 0 %}
        <p>Total: ${{ total }}</p>
    {% else %}
        <p>No items in cart</p>
    {% endif %}
</body>
</html>

Real programs from Software Heritage

3 samples mined from derived_datasets/<date>/contents/*.parquet, byte-verified against the SWH archive. Citation-grade qualified SWHIDs preserved.
macro-get_funnel.jinja · 544 B · ext .jinja · seen 587× in SWH
via unique-primary
swh:1:cnt:6d6db626553381276941d398c98e2429c352842c;origin=https://github.com/xdvsf/xrpl-dev-portal;anchor=swh:1:rev:d88b0420ca5efe5afcc56ff0510c9679d08b5aec;path=/template/macro-get_funnel.jinja
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
{% macro get_funnel(pages, page) -%}
{%- set concepts = pages|selectattr('html', 'defined_and_equalto', 'concepts.html')|first -%}
{%- set tutorials = pages|selectattr('html', 'defined_and_equalto', 'tutorials.html')|first -%}
{%- set references = pages|selectattr('html', 'defined_and_equalto', 'references.html')|first -%}
{%- if concepts.is_ancestor_of(page.html) -%}Concepts
{%- elif tutorials.is_ancestor_of(page.html) -%}Tutorials
{%- elif references.is_ancestor_of(page.html) -%}References
{%- else -%}Other{%- endif -%}
{%- endmacro %}
component-top-nav.html.jinja · 6509 B · ext .jinja · seen 100× in SWH
via unique-primary
swh:1:cnt:d213448489b446f0e04b18616ad1213b2d6888ca;origin=https://github.com/Grokci/XRP_examples;anchor=swh:1:rev:3ec8718b46cc29eadef2c2732167ed4c29197111;path=/template/component-top-nav.html.jinja
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
<nav class="top-nav navbar navbar-expand-lg navbar-dark fixed-top">
  <a href="{% if currentpage.prefix %}{{currentpage.prefix}}{% else %}/{% endif %}" class="navbar-brand"><img class="logo"  height="40" alt="{{target.display_name}}" /></a>
  <button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#top-main-nav" aria-controls="navbarHolder" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"><div></div></span>
  </button>
  <div class="collapse navbar-collapse justify-content-between" id="top-main-nav">
    <ul class="nav navbar-nav" id="topnav-pages">
      {% macro dropdown(top_page) %}
      {% set printed_groupings = [] %}
      {% if top_page.children|selectattr('top_nav_omit', 'undefined_or_ne', True)|list|length %}
      <li class="nav-item dropdown">
        <a class="nav-link dropdown-toggle" href="{% if "//" not in top_page.html %}{{currentpage.prefix}}{% endif %}{{top_page.html}}" id="topnav_{{slug(top_page.html)}}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>{% if top_page.top_nav_name is defined %}{{top_page.top_nav_name}}{% else %}{{top_page.name}}{% endif %}</span></a>
        <div class="dropdown-menu" aria-labelledby="topnav_{{slug(top_page.html)}}" id="topnav_dd_{{slug(top_page.html)}}">
          {% if top_page.top_nav_hero_image is defined %}
          <a class="dropdown-item dropdown-hero" id="dropdown-hero-for-{{slug(top_page.name)}}" href="{% if "//" not in top_page.html %}{{currentpage.prefix}}{% endif %}{{top_page.html}}">
            <img id="{{top_page.top_nav_hero_image}}" alt="{{top_page.name}} icon" />
            <div class="dropdown-hero-text">
              <h4>{{top_page.name}}</h4>
              <p>{{top_page.top_nav_blurb|default(top_page.blurb)}}</p>
            </div>
          </a>
          {% elif top_page.top_nav_grouping is defined %}
          <div class="navcol col-for-{{slug(top_page.top_nav_grouping)}}">
            <h5 class="dropdown-item">{{top_page.top_nav_grouping}}</h5>
            {% set _ = printed_groupings.append(top_page.top_nav_grouping) %}
            <a class="dropdown-item {% if currentpage == top_page %} active{% endif %}" href="{% if "//" not in top_page.html %}{{currentpage.prefix}}{% endif %}{{top_page.html}}">{{top_page.name}}</a>
          {% endif %}
          {% set dropdownchildren = top_page.children|list %}
          {% for linkhtml in top_page.top_nav_shortcuts %}
            {% set _ = dropdownchildren.append(pages|selectattr("html", "defined_and_equalto", linkhtml)|first) %}
            {% if _ is not defined %}
              {% include "ERROR: Couldn't find page "+linkhtml+" from top_nav_shortcuts" %}
            {% endif %}
          {% endfor %}
          {% for link in dropdownchildren if not link.top_nav_omit %}
            {% if link.top_nav_grouping not in printed_groupings %}
            {% if printed_groupings %}
          </div><!--./col-->
            {% endif %}
            {% if link.top_nav_grouping is defined %}
          <div class="navcol col-for-{{slug(link.top_nav_grouping)}}">
            <h5 class="dropdown-item">{{link.top_nav_grouping}}</h5>
            {% else %}
          <div class="navcol col-for-ungrouped">
            {% endif %}
            {% set _ = printed_groupings.append(link.top_nav_grouping) %}
            {% endif %}
            <a class="dropdown-item{% if currentpage == link %} active{% endif %}{% if "//" in link.html %} external-link{% endif %}" href="{% if "//" not in link.html %}{{currentpage.prefix}}{% endif %}{{link.html}}"{% if "//" in link.html %} target="_blank"{% endif %}>{% if link.top_nav_name is defined %}{{link.top_nav_name}}{% else %}{{link.name}}{% endif %}</a>
          {% endfor %}
          </div><!--./col-->
        </div><!--/.dropdown-menu-->
      </li>
      {% elif not top_page.top_nav_omit %}
      <li class="nav-item">
        <a class="nav-link{% if "//" in top_page.html %} external-link{% endif %}" href="{% if "//" not in top_page.html %}{{currentpage.prefix}}{% endif %}{{top_page.html}}"{% if "//" in top_page.html %} target="_blank"{% endif %}><span>{{top_page.name}}</span></a>
      </li>
      {% endif %}
      {% endmacro %}

      {% for page in (pages|first).children %}
      {{ dropdown(page) }}
      {% endfor %}
    </ul><!-- /.navbar-nav -->

    <div class="nav-item search" id="topnav-search">
      <form class="navbar-form navbar-right" role="search">
        <div class="form-inline">
          <div class="input-group" id="topsearchboxcontainer">
            <label class="input-group-prepend" for="topsearchbox"><i class="fa fa-search input-group-text"></i><span class="sr-only">{% trans %}Search{% endtrans %}</span></label>
            <input id="topsearchbox" name="q" type="text" class="form-control searchinput" placeholder="{% trans %}Search site...{% endtrans %}">
          </div><!--/.input-group-->
        </div>
      </form>
    </div><!--/#topnav-search-->

    <div class="nav-item" id="topnav-language">
      <div class="dropdown">
        <a class="nav-link dropdown-toggle with-caret" id="language_selector_header_btn" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          {{(config.languages|selectattr('code', 'eq', target.lang)|first).display_name}}
          <span class="chevron"><span></span><span></span></span>
        </a>
        <div class="dropdown-menu smaller-dropdown" aria-labelledby="language_selector_header_btn">
          <hr />
          {% for lang in config.languages if lang.code != target.lang %}
          <a class="dropdown-item" href="{{lang.prefix}}{{currentpage.html}}">
            {{lang.display_name}}
          </a>
          <hr />
          {% endfor %}
        </div><!--/.dropdown-menu-->
      </div><!--/.dropdown-->
    </div><!--/.language-selector-->

    {% if target.light_theme_enabled %}
    <div class="nav-item" id="topnav-theme">
      <form class="form-inline">
        <div class="custom-control custom-theme-toggle form-inline-item" title="" data-toggle="tooltip" data-placement="left" data-original-title="Toggle Dark Mode">
          <input type="checkbox" class="custom-control-input" id="css-toggle-btn">
          <label class="custom-control-label" for="css-toggle-btn"><span class="d-lg-none">Light/Dark Theme</span></label>
        </div>
      </form>
    </div><!--/#topnav-theme-->
    {% endif %}
  </div><!--/#top-main-nav-->
</nav>
02_dns.json.j2 · 291 B · ext .j2 · seen 54× in SWH
via fallback
swh:1:cnt:e92212e473ab6db805490228333e8018a01fed67;origin=https://github.com/winada82/sing-box;anchor=swh:1:rev:d6d01684992043d8d129eb37c3a71c9d057d5f6e;path=/singbox/configs/02_dns.json.j2
Open in SWH · Raw bytes (SWH) · GitHub raw
Show source
{
  "dns": {
    "servers": [
        {
        "tag": "cloudflare",
        "address": "{{ hconfigs['dns_server'] or "1.1.1.1" }}",
        "strategy": "prefer_ipv4",
        "detour": "freedom",
      }
    ],
    "rules": [],
    "final": "cloudflare",
    "strategy": "prefer_ipv4"
  }
}

Contribute — propose a file extension

Tell us where to find evidence about Jinja (mapped to pl/jinja). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Jinja/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← jingo Jinni →