diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-08-03 13:22:07 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-08-03 13:22:07 +0300 |
| commit | 23821211e03cd69cf87b2f264b48e0125fcac29d (patch) | |
| tree | 42bd1a9fd7a8922a5351aed16309331d431acf7a /templates_gmi/macros.html | |
| parent | 72a42e0449a0cbbbc455b36af9f53fc293c73fdf (diff) | |
Add gemini protocol
Diffstat (limited to 'templates_gmi/macros.html')
| -rw-r--r-- | templates_gmi/macros.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/templates_gmi/macros.html b/templates_gmi/macros.html new file mode 100644 index 0000000..d3d5562 --- /dev/null +++ b/templates_gmi/macros.html @@ -0,0 +1,21 @@ +{% macro toc(page) %}{% endmacro %} + +{% macro linklog(page) %} +{% set lh_data = load_data(path="linklog.json") %} +{% for lh_post in lh_data.posts %} +=> {{ lh_post.href }} {{ lh_post.description }} ({{ lh_post.time | date(format='%Y-%m-%d') }}) +{% endfor %} +{% endmacro %} + +{% macro page_h1(page) %} +# {{ page.title }} + +{% if page.date %}({{ page.date }}){% endif %}{% if page.extra.kind %} [{{ page.extra.kind }}]{% endif %} +{% endmacro %} + +{% macro page_content(page) %} +{{ self::page_h1(page=page) }} +<!-- START_GEMINI_CONTENT --> +{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe }} +<!-- END_GEMINI_CONTENT --> +{% endmacro %} |
