From 25cf78720efb544c0c2516d1a4137035878b6a2e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 2 Jan 2026 14:35:37 +0200 Subject: Add linklog --- templates/macros.html | 12 ++++++++++++ templates/page.html | 5 +++-- templates/page_linklog.html | 6 ++++++ templates/shortcodes/linklog.html | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 templates/page_linklog.html create mode 100644 templates/shortcodes/linklog.html (limited to 'templates') diff --git a/templates/macros.html b/templates/macros.html index cb5efdc..b4cb6d0 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -14,3 +14,15 @@ {% endmacro %} + +{% macro linklog(page) %} +{% set lh_data = load_data(path="linklog.json") %} + +{% endmacro %} diff --git a/templates/page.html b/templates/page.html index 786b800..c6be731 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,5 +1,6 @@ -{% extends "base.html" %} {% import "macros.html" as macros %} {% block content -%} +{% extends "base.html" %} +{% import "macros.html" as macros %} +{% block content %}

{{ page.title }}
diff --git a/templates/page_linklog.html b/templates/page_linklog.html new file mode 100644 index 0000000..e4fc945 --- /dev/null +++ b/templates/page_linklog.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} + +{% block content %} +{{ page.content | replace(from="", to=macros::linklog(page=page)) | safe }} +{% endblock %} diff --git a/templates/shortcodes/linklog.html b/templates/shortcodes/linklog.html new file mode 100644 index 0000000..6f46a2b --- /dev/null +++ b/templates/shortcodes/linklog.html @@ -0,0 +1 @@ + -- cgit v1.3