aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-22 14:04:13 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-22 14:04:13 -0600
commit2988da14bed5f628cf4cd90eca0eec3c11f0c061 (patch)
tree1f8b9f6e18b659f778715829c8259e8c2868cda7 /templates
parent5c13375f554103c5a9cc78f902020744d35c24f2 (diff)
downloadgityeet-2988da14bed5f628cf4cd90eca0eec3c11f0c061.tar.gz
gityeet-2988da14bed5f628cf4cd90eca0eec3c11f0c061.zip
add syntax highlighting to files
Diffstat (limited to 'templates')
-rw-r--r--templates/repo_file.html5
-rw-r--r--templates/repo_folder.html1
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo_file.html b/templates/repo_file.html
index e01d02c..796846e 100644
--- a/templates/repo_file.html
+++ b/templates/repo_file.html
@@ -9,9 +9,8 @@
</head>
<body>
<h1><a href="/">gityeet</a></h1>
+<h2><a href="/{{ repo_path }}/">{{ repo_path }}</a></h2>
<p>{{ rel_path }}</p>
-<pre>
-{{ blob.content()|from_utf8_lossy }}
-</pre>
+{{ blob.content()|from_utf8_lossy|highlight(rel_path)|safe }}
</body>
</html>
diff --git a/templates/repo_folder.html b/templates/repo_folder.html
index 6f6b3a9..81f455f 100644
--- a/templates/repo_folder.html
+++ b/templates/repo_folder.html
@@ -9,6 +9,7 @@
</head>
<body>
<h1><a href="/">gityeet</a></h1>
+<h2><a href="/{{ repo_path }}/">{{ repo_path }}</a></h2>
<p>{{ rel_path }}</p>
{%- macro effective_name(entry) -%}
{{- entry.name().unwrap() -}}