Skip to content

Commit e41c7ba

Browse files
committed
fix last link, add datestamp
1 parent 22df21f commit e41c7ba

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import shutil
2020
import sys
2121
import urllib.request
22+
from datetime import date
2223
from pathlib import Path
2324

2425
import yaml
@@ -92,7 +93,11 @@ def fetch_assets() -> None:
9293

9394
def load_context() -> dict:
9495
with CTX.open(encoding="utf-8") as f:
95-
return yaml.safe_load(f)
96+
data = yaml.safe_load(f)
97+
today = date.today()
98+
data['year'] = today.year
99+
data['datestamp'] = today.strftime('%Y-%m-%d')
100+
return data
96101

97102

98103
def build_one(env: Environment, context: dict, template_path: Path) -> Path:

context.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Page-specific content lives directly in the respective src/*.jinja file.
33
site:
44
name: "Mathias Ertl"
5-
year: 2026
65
email: "mati@er.tl"
76

87
socials:
@@ -30,8 +29,8 @@ projects:
3029
- name: structured-tutorials
3130
url: https://github.com/mathiasertl/structured-tutorials/
3231
description: Tutorials as YAML files, executable on your system or renderable as Sphinx documentation.
33-
- name: hp
34-
url: https://github.com/mathiasertl/mathiasertl.github.io
32+
- name: mathiasertl.github.io
33+
url: https://github.com/mathiasertl/mathiasertl.github.io/
3534
description: This simple website.
3635
- name: fabric
3736
url: https://github.com/mathiasertl/fabric/

src/_base.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
<!-- Footer -->
4949
<footer class="max-w-2xl mx-auto px-6 py-8 border-t border-stone-200 text-xs text-stone-400 flex justify-between">
50-
<span>{{ site.name }} &copy; {{ site.year }}</span>
50+
<span>{{ site.name }} &copy; {{ year }}, last updated: {{ datestamp }}</span>
5151
{% block footer_right %}<span>Made with plain HTML &amp; Tailwind</span>{% endblock %}
5252
</footer>
5353

0 commit comments

Comments
 (0)