From 7620dd41ca41cf4fb445d6a6e9afe2607ed77a95 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 22 Apr 2021 06:44:04 -0600 Subject: actually handle subfolders --- templates/repo_folder.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 templates/repo_folder.html (limited to 'templates/repo_folder.html') diff --git a/templates/repo_folder.html b/templates/repo_folder.html new file mode 100644 index 0000000..6f6b3a9 --- /dev/null +++ b/templates/repo_folder.html @@ -0,0 +1,33 @@ + + + + + + + {{ title }} + + +

gityeet

+

{{ rel_path }}

+{%- macro effective_name(entry) -%} + {{- entry.name().unwrap() -}} + {%- match entry.kind() -%} + {%- when Some with (x) %}{% match x %}{% when git2::ObjectType::Tree %}/{% else %}{% endmatch %} + {%- else -%} + {%- endmatch -%} +{%- endmacro -%} + +{% for entry in tree -%} +{% if entry.name().unwrap() == "README.md" -%} +{{ entry.to_object(repo).unwrap().into_blob().unwrap().content()|from_utf8_lossy|markdown|safe }} +{%- endif %} +{%- endfor %} + + -- cgit v1.2.3