File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919import shutil
2020import sys
2121import urllib .request
22+ from datetime import date
2223from pathlib import Path
2324
2425import yaml
@@ -92,7 +93,11 @@ def fetch_assets() -> None:
9293
9394def 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
98103def build_one (env : Environment , context : dict , template_path : Path ) -> Path :
Original file line number Diff line number Diff line change 22# Page-specific content lives directly in the respective src/*.jinja file.
33site :
44 name : " Mathias Ertl"
5- year : 2026
65 email : " mati@er.tl"
76
87socials :
@@ -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/
Original file line number Diff line number Diff line change 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 }} © ; {{ site. year }}</span >
50+ <span >{{ site.name }} © ; {{ year }}, last updated: {{ datestamp }}</span >
5151 {% block footer_right %} <span >Made with plain HTML & ; Tailwind</span >{% endblock %}
5252 </footer >
5353
You can’t perform that action at this time.
0 commit comments