diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-08-03 15:02:33 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-08-03 15:02:33 +0300 |
| commit | dfde1ae901958bd61219a180903561b4a7c2e2ad (patch) | |
| tree | 7036dae0ff0e87ff58ee565777472663ccf90fe2 | |
| parent | b8110f45936b5c5e484684bcf3f9f5a3e4bba22f (diff) | |
Improve gemini generation
| -rw-r--r-- | Makefile | 11 | ||||
| -rw-r--r-- | templates_gmi/macros.html | 2 | ||||
| -rw-r--r-- | templates_gmi/now.html | 7 | ||||
| -rw-r--r-- | templates_gmi/page_linklog.html | 2 | ||||
| -rw-r--r-- | templates_gmi/section_posts.html | 2 | ||||
| -rw-r--r-- | templates_gmi/section_projects.html | 2 |
6 files changed, 17 insertions, 9 deletions
@@ -1,8 +1,14 @@ .PHONY: all -all: clean - @echo "Building project..." +all: clean linklog build + +.PHONY: linklog +linklog: ./update-linklog-json.sh +.PHONY: build +build: clean + @echo "Building project..." + # Build html ln -s templates_html templates zola build -o public_html @@ -20,7 +26,6 @@ all: clean .PHONY: dev dev: @echo "Starting development server..." - ./update-linklog-json.sh ln -s templates_html templates zola serve --drafts diff --git a/templates_gmi/macros.html b/templates_gmi/macros.html index d3d5562..2f95358 100644 --- a/templates_gmi/macros.html +++ b/templates_gmi/macros.html @@ -2,9 +2,11 @@ {% macro linklog(page) %} {% set lh_data = load_data(path="linklog.json") %} +<!-- END_GEMINI_CONTENT --> {% for lh_post in lh_data.posts %} => {{ lh_post.href }} {{ lh_post.description }} ({{ lh_post.time | date(format='%Y-%m-%d') }}) {% endfor %} +<!-- START_GEMINI_CONTENT --> {% endmacro %} {% macro page_h1(page) %} diff --git a/templates_gmi/now.html b/templates_gmi/now.html index 3062054..63e9441 100644 --- a/templates_gmi/now.html +++ b/templates_gmi/now.html @@ -1,10 +1,9 @@ {% extends "base.html" %} {% import "macros.html" as macros %} {% block content %} -{% set posts = get_section(path="posts/_index.md") %} -{% set nows = posts.pages | filter(attribute="extra.kind", value="now") %} -{% set latest_now = nows | sort(attribute="date") | last %} - +{% set posts = get_section(path="posts/_index.md") -%} +{% set nows = posts.pages | filter(attribute="extra.kind", value="now") -%} +{% set latest_now = nows | sort(attribute="date") | last -%} {{ macros::page_content(page=latest_now) }} {% endblock %} diff --git a/templates_gmi/page_linklog.html b/templates_gmi/page_linklog.html index 14602d6..e55b712 100644 --- a/templates_gmi/page_linklog.html +++ b/templates_gmi/page_linklog.html @@ -2,6 +2,6 @@ {% import "macros.html" as macros %} {% block content %} <!-- START_GEMINI_CONTENT --> -{{ page.content | replace(from="<!-- linklog -->", to=macros::linklog(page=page)) }} +{{ page.content | replace(from="<!-- linklog -->", to=macros::linklog(page=page)) | safe }} <!-- END_GEMINI_CONTENT --> {% endblock %} diff --git a/templates_gmi/section_posts.html b/templates_gmi/section_posts.html index 4d2cb55..af86c23 100644 --- a/templates_gmi/section_posts.html +++ b/templates_gmi/section_posts.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block content %} {% set posts = get_section(path="posts/_index.md") %} -## {{ section.title }} +# {{ section.title }} => /atom.xml Follow via Atom/RSS => https://aboutfeeds.com/ Huh? diff --git a/templates_gmi/section_projects.html b/templates_gmi/section_projects.html index be0db07..bdc5044 100644 --- a/templates_gmi/section_projects.html +++ b/templates_gmi/section_projects.html @@ -1,5 +1,7 @@ {% extends "base.html" %} {% block content %} +<!-- START_GEMINI_CONTENT --> {{ section.content | safe }} +<!-- END_GEMINI_CONTENT --> {% endblock %} |
