summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-08-24 14:08:47 +0200
committerChristoph Schlosser <christoph@linux.com>2025-08-24 14:08:47 +0200
commit49fb19170a74accf51aa13ef0600a0d15f707737 (patch)
treea0a66e919e031638129ab9b128eb74c12e376fe7 /templates
parent782a350e1f56292176ac8471195c889e47b2b841 (diff)
downloadgit2hugo-49fb19170a74accf51aa13ef0600a0d15f707737.tar.gz
g2h: Add log page
Diffstat (limited to 'templates')
-rw-r--r--templates/_head.md5
-rw-r--r--templates/log.md10
-rw-r--r--templates/overview.md12
3 files changed, 19 insertions, 8 deletions
diff --git a/templates/_head.md b/templates/_head.md
new file mode 100644
index 0000000..a91e1b6
--- /dev/null
+++ b/templates/_head.md
@@ -0,0 +1,5 @@
+---
+title: {{ title }}
+---
+
+# {{ title }}
diff --git a/templates/log.md b/templates/log.md
new file mode 100644
index 0000000..70f719f
--- /dev/null
+++ b/templates/log.md
@@ -0,0 +1,10 @@
+{% include '_head.md' %}
+
+{% if commits %}
+| Message | Branches/Tags | Date |
+|---------|---------------|------|
+{%- for commit in commits %}
+| {{ commit.summary }} | {% if commit.refs %}{{ commit.refs | join(', ') }}{% endif %} | {{ commit.committed_datetime.strftime('%Y-%m-%d %H:%M:%S') }} |{% endfor %}
+{% else %}
+No commits found.
+{% endif %}
diff --git a/templates/overview.md b/templates/overview.md
index cc6f990..c1f1d05 100644
--- a/templates/overview.md
+++ b/templates/overview.md
@@ -1,23 +1,19 @@
----
-title: {{ title }}
----
-
-# {{ title }}
+{% include '_head.md' %}
{% if branches %}
| Branch | Commit | Date |
|--------|--------|------|
{%- for branch in branches %}
-| {{ branch.name }} | {{ branch.commit.summary }} | {{ branch.commit.authored_datetime.strftime('%Y-%m-%d %H:%M:%S') }} |{% endfor %}
+| {{ branch.name }} | {{ branch.commit.summary }} | {{ branch.commit.committed_datetime.strftime('%Y-%m-%d %H:%M:%S') }} |{% endfor %}
{% else %}
No branches found.
{% endif %}
{% if tags %}
| Tag | Commit | Date |
-|--------|--------|------|
+|-----|--------|------|
{%- for tag in tags %}
-| {{ tag.name }} | {{ tag.commit.summary }} | {{ tag.commit.authored_datetime.strftime('%Y-%m-%d %H:%M:%S') }} |{% endfor %}
+| {{ tag.name }} | {{ tag.commit.summary }} | {{ tag.commit.committed_datetime.strftime('%Y-%m-%d %H:%M:%S') }} |{% endfor %}
{% else %}
No tags found.
{% endif %}