summaryrefslogtreecommitdiffstats
path: root/templates/file.md
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-10-10 17:19:27 +0200
committerChristoph Schlosser <christoph@linux.com>2025-10-10 17:19:27 +0200
commit85da4abc206f2cc8819836bb0e8727de3a51d24c (patch)
tree6c4884cef49da8ccb1f21bc180d4b6a5681bd267 /templates/file.md
parent2a076517255c4585ac2bc475aaafdc728b6dae6f (diff)
downloadgit2hugo-85da4abc206f2cc8819836bb0e8727de3a51d24c.tar.gz
g2h: Render markdown files instead of putting them into code blocks
Diffstat (limited to 'templates/file.md')
-rw-r--r--templates/file.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/file.md b/templates/file.md
index 5f4dcbd..39b3202 100644
--- a/templates/file.md
+++ b/templates/file.md
@@ -6,10 +6,14 @@
{% include '_breadcrumbs.md' %}
{% if type == 'text' %}
+{% if backtick_max >= 3 %}
{% set backticks = '`' * backtick_max %}
{{ backticks }}{{ file_extension }}
+{% endif %}
{{ content }}
+{% if backtick_max >= 3 %}
{{ backticks }}
+{% endif %}
{% elif type == 'image' %}
![](data:image/png;base64,{{ content }})
{% elif type == 'empty' %}