🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

-rw-r--r-- test/templates/repo/foreach.blob.html


      1 {% extends "../title.html.include" -%}
      2 {%- block title -%}{{ blob }}{%- endblock -%}
      3 
      4 {% block body %}
      5 scope: blob
      6 blob: {{ blob }}
      7 blob.path: {{ blob.path }}
      8 blob.href: {{ blob.href }}
      9 blob.contents: {% if blob.is_binary %}(binary)
     10 {% else %}{{ blob.contents }}{% endif %}
     11 blob.mode: {{ blob.mode }}
     12 blob.mode_octal: {{ blob.mode_octal }}
     13 blob.mode_symbolic: {{ blob.mode_symbolic }}
     14 if blob.is_directory then "directory" else "file":
     15 	{%- if blob.is_directory %} "directory"{% else %} "file"{% endif %}
     16 
     17 
     18 blob scope also should have data from repo scope available:
     19 host: {{ host }}
     20 repos: {{ repositories }}
     21 name: {{ name }}
     22 description: {{ description }}
     23 commits: (skipped)
     24 tree: (skipped)
     25 tags: {{ length(filter(tags, (t) -> t.name == "0.2.0")) }}
     26 readme.path: {{ readme.path }}
     27 license.path: {{ license.path }}
     28 {% endblock %}
     29