From 23821211e03cd69cf87b2f264b48e0125fcac29d Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Mon, 3 Aug 2026 13:22:07 +0300 Subject: Add gemini protocol --- .gitignore | 4 +- Makefile | 26 ++++- convert_gmi_html.py | 60 ++++++++++++ templates/atom.xml | 68 ------------- templates/base.html | 171 --------------------------------- templates/index.html | 64 ------------ templates/macros.html | 45 --------- templates/now.html | 11 --- templates/page.html | 37 ------- templates/page_linklog.html | 6 -- templates/section_posts.html | 19 ---- templates/section_projects.html | 5 - templates/shortcodes/fig.html | 4 - templates/shortcodes/linklog.html | 1 - templates/shortcodes/toc.html | 1 - templates_gmi/atom.xml | 68 +++++++++++++ templates_gmi/base.html | 11 +++ templates_gmi/index.html | 51 ++++++++++ templates_gmi/macros.html | 21 ++++ templates_gmi/now.html | 10 ++ templates_gmi/page.html | 11 +++ templates_gmi/page_linklog.html | 7 ++ templates_gmi/section_posts.html | 11 +++ templates_gmi/section_projects.html | 5 + templates_gmi/shortcodes/fig.html | 1 + templates_gmi/shortcodes/linklog.html | 1 + templates_gmi/shortcodes/toc.html | 1 + templates_html/atom.xml | 68 +++++++++++++ templates_html/base.html | 171 +++++++++++++++++++++++++++++++++ templates_html/index.html | 64 ++++++++++++ templates_html/macros.html | 45 +++++++++ templates_html/now.html | 11 +++ templates_html/page.html | 37 +++++++ templates_html/page_linklog.html | 6 ++ templates_html/section_posts.html | 19 ++++ templates_html/section_projects.html | 5 + templates_html/shortcodes/fig.html | 4 + templates_html/shortcodes/linklog.html | 1 + templates_html/shortcodes/toc.html | 1 + 39 files changed, 714 insertions(+), 438 deletions(-) create mode 100755 convert_gmi_html.py delete mode 100644 templates/atom.xml delete mode 100644 templates/base.html delete mode 100644 templates/index.html delete mode 100644 templates/macros.html delete mode 100644 templates/now.html delete mode 100644 templates/page.html delete mode 100644 templates/page_linklog.html delete mode 100644 templates/section_posts.html delete mode 100644 templates/section_projects.html delete mode 100644 templates/shortcodes/fig.html delete mode 100644 templates/shortcodes/linklog.html delete mode 100644 templates/shortcodes/toc.html create mode 100644 templates_gmi/atom.xml create mode 100644 templates_gmi/base.html create mode 100644 templates_gmi/index.html create mode 100644 templates_gmi/macros.html create mode 100644 templates_gmi/now.html create mode 100644 templates_gmi/page.html create mode 100644 templates_gmi/page_linklog.html create mode 100644 templates_gmi/section_posts.html create mode 100644 templates_gmi/section_projects.html create mode 100644 templates_gmi/shortcodes/fig.html create mode 100644 templates_gmi/shortcodes/linklog.html create mode 100644 templates_gmi/shortcodes/toc.html create mode 100644 templates_html/atom.xml create mode 100644 templates_html/base.html create mode 100644 templates_html/index.html create mode 100644 templates_html/macros.html create mode 100644 templates_html/now.html create mode 100644 templates_html/page.html create mode 100644 templates_html/page_linklog.html create mode 100644 templates_html/section_posts.html create mode 100644 templates_html/section_projects.html create mode 100644 templates_html/shortcodes/fig.html create mode 100644 templates_html/shortcodes/linklog.html create mode 100644 templates_html/shortcodes/toc.html diff --git a/.gitignore b/.gitignore index 68da03a..5f37a4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ -public/ +public* linklog.json .envrc static/giallo.css .obsidian/ .stfolder/ +.DS_Store +.certificates/ diff --git a/Makefile b/Makefile index b063004..253d565 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,37 @@ .PHONY: all -all: +all: clean @echo "Building project..." ./update-linklog-json.sh - zola build + + # Build html + ln -s templates_html templates + zola build -o public_html + unlink templates || true + + # Build gemini + ln -s templates_gmi templates + zola build -o public_gmi + find public_gmi -type f -name '*.html' -exec sh -c \ + 'for html do mv "$$html" "$${html%.html}.gmi"; done' sh {} + + # Convert HTML blocks to gemtext + ./convert_gmi_html.py public_gmi + unlink templates || true .PHONY: dev dev: @echo "Starting development server..." ./update-linklog-json.sh - zola serve + ln -s templates_html templates + zola serve --drafts .PHONY: deploy deploy: @echo "Deploying project..." - rsync -rvzP --delete --chown 80:80 public/* $(RSYNC_TARGET) + rsync -rvzP --delete --chown 80:80 public_html/* $(RSYNC_TARGET_HTML) + rsync -rvzP --delete --chown 80:80 public_gmi/* $(RSYNC_TARGET_GMI) .PHONY: clean clean: @echo "Cleaning project..." - rm -rf public + unlink templates || true + rm -rf public* diff --git a/convert_gmi_html.py b/convert_gmi_html.py new file mode 100755 index 0000000..abfbe4a --- /dev/null +++ b/convert_gmi_html.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +"""Convert HTML blocks in .gmi files to gemtext using html2gmi.""" + +import html +import subprocess +import sys +from pathlib import Path + +START_MARKER = "" +END_MARKER = "" +HTML2GMI = Path.home() / "go/bin/html2gmi" + + +def convert_file(path: Path) -> None: + content = path.read_text() + result = [] + pos = 0 + + while True: + start = content.find(START_MARKER, pos) + if start == -1: + result.append(content[pos:]) + break + + end = content.find(END_MARKER, start) + if end == -1: + result.append(content[pos:]) + break + + # Add content before the marker + result.append(content[pos:start]) + + # Convert HTML block to gemtext + html_content = content[start + len(START_MARKER):end] + converted = subprocess.run( + [HTML2GMI], + input=html_content, + capture_output=True, + text=True, + ) + result.append(converted.stdout) + + pos = end + len(END_MARKER) + + # Unescape HTML entities in the entire file + path.write_text(html.unescape("".join(result))) + + +def main() -> None: + if len(sys.argv) < 2: + print(f"Usage: {sys.argv[0]} ", file=sys.stderr) + sys.exit(1) + + directory = Path(sys.argv[1]) + for path in directory.rglob("*.gmi"): + convert_file(path) + + +if __name__ == "__main__": + main() diff --git a/templates/atom.xml b/templates/atom.xml deleted file mode 100644 index b1721ce..0000000 --- a/templates/atom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - {{ config.title }} - {%- if term %} - {{ term.name }} - {%- elif section.title %} - {{ section.title }} - {%- endif -%} - - {%- if config.description %} - {{ config.description }} - {%- endif %} - - - Zola - {% if last_updated is defined %}{{ last_updated | date(format="%+") }}{% endif %} - {{ feed_url | safe }} - {%- for page in pages %} - - {{ page.title }} - {{ page.date | date(format="%+") }} - {{ page.updated | default(value=page.date) | date(format="%+") }} - {% for author in page.authors %} - - - {{ author }} - - - {% else %} - - - {%- if config.author -%} - {{ config.author }} - {%- else -%} - Unknown - {%- endif -%} - - - {% endfor %} - - {{ page.permalink | safe }} - {% if page.summary %} - {{ page.summary }} - {% else %} - - {{ page.content }} - - {% endif %} - - {%- endfor %} - diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index 82f185e..0000000 --- a/templates/base.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - {% if page.date %} - - {% endif %} - - {% if page.extra.keywords %} - - {% endif %} - - {% block title %} - {% if page.title %} - {{ page.title }} — {{ config.title }} - {% elif section.title %} - {{ section.title }} — {{ config.title }} - {% else %} - {{ config.title }} - {% endif %} - {% endblock %} - - {% block description %} - {% if page.description %} - - {% elif page.summary %} - - {% else %} - - {% endif %} - {% endblock %} - - - - - - - - - -
- Jan Tuomi -
-
- - -
{% block content %}{% endblock %}
- - - - - - diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 31d0a90..0000000 --- a/templates/index.html +++ /dev/null @@ -1,64 +0,0 @@ -{% extends "base.html" %} -{% block content %} - -


- - Hi! My name is Jan. I am a senior software engineer based in Finland. Welcome to my personal blog and digital garden¹. -

-

I like keeping things simple and pragmatic. I'm a life-long learner, but I don't go chasing trends.

-

I enjoy spending time with my fiancée and our dog, tinkering with computer hardware and software, games of all kinds but mostly video-, tabletop and role-playing, electronics, music, language learning and linguistics.

-

I created this site² as a creative outlet for expressing myself and sharing my experiences.

- -{% set posts = get_section(path="posts/_index.md") %} -
-

Latest posts

-
    -{% for page in posts.pages | slice(end=3) %} -
  • - {{ page.title }} - ({{ page.date | date(format="%Y-%m-%d") }}) -
  • -{% endfor %} -
- -

The posts page is a listing of my posts. I post sporadically about various subjects and with varying levels of effort.

-

The linklog page contains a curated aggregation of bookmarks, saved blog posts and essays, books, series, papers or anything else that I feel like sharing or recommending, stored in Linkhut.

-

On the now page I write what's currently going on in my life. Stuff that some would write onto their social media page.

-

The projects page contains info about my hobby projects.

- -
-
-

Contact

- -
-
-

Webrings

- -An IndieWeb Webring 💍 - -
- -Fediring - - -
-
- -
- -

-[1] The phrase "digital garden" is a metaphor for thinking about writing and creating that focuses less on the resulting "showpiece" and more on the process, care, and craft it takes to get there. — Joel Hooks -

- -

-[2] This site is written using the Zola static site generator. At first, the site was automatically deployed after every Markdown edit, but nowadays I use a more traditional manual deploy mechanism. -

- - -{% endblock %} diff --git a/templates/macros.html b/templates/macros.html deleted file mode 100644 index 3922659..0000000 --- a/templates/macros.html +++ /dev/null @@ -1,45 +0,0 @@ -{% macro toc(page) %} - -{% endmacro %} - -{% macro linklog(page) %} -{% set lh_data = load_data(path="linklog.json") %} - -{% 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) }} -{{ page.content | replace(from="", to=macros::toc(page=page)) | safe }} -{% endmacro %} diff --git a/templates/now.html b/templates/now.html deleted file mode 100644 index f05b6aa..0000000 --- a/templates/now.html +++ /dev/null @@ -1,11 +0,0 @@ -{% 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 %} - -{{ macros::page_content(page=latest_now) }} - -{% endblock %} diff --git a/templates/page.html b/templates/page.html deleted file mode 100644 index 61db175..0000000 --- a/templates/page.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "base.html" %} -{% import "macros.html" as macros %} -{% block content %} - -{{ macros::page_content(page=page) }} - - - - -{% endblock %} diff --git a/templates/page_linklog.html b/templates/page_linklog.html deleted file mode 100644 index e4fc945..0000000 --- a/templates/page_linklog.html +++ /dev/null @@ -1,6 +0,0 @@ -{% 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/section_posts.html b/templates/section_posts.html deleted file mode 100644 index f44321f..0000000 --- a/templates/section_posts.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} -{% block content %} -{% set posts = get_section(path="posts/_index.md") %} - -

{{ section.title }}

-

- Follow via Atom/RSS (Huh?) -

- diff --git a/templates/section_projects.html b/templates/section_projects.html deleted file mode 100644 index be0db07..0000000 --- a/templates/section_projects.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -{{ section.content | safe }} -{% endblock %} diff --git a/templates/shortcodes/fig.html b/templates/shortcodes/fig.html deleted file mode 100644 index 4ac99b4..0000000 --- a/templates/shortcodes/fig.html +++ /dev/null @@ -1,4 +0,0 @@ -
- {{ alt }} - -
diff --git a/templates/shortcodes/linklog.html b/templates/shortcodes/linklog.html deleted file mode 100644 index 6f46a2b..0000000 --- a/templates/shortcodes/linklog.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/templates/shortcodes/toc.html b/templates/shortcodes/toc.html deleted file mode 100644 index 479abec..0000000 --- a/templates/shortcodes/toc.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/templates_gmi/atom.xml b/templates_gmi/atom.xml new file mode 100644 index 0000000..b1721ce --- /dev/null +++ b/templates_gmi/atom.xml @@ -0,0 +1,68 @@ + + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + {%- if config.description %} + {{ config.description }} + {%- endif %} + + + Zola + {% if last_updated is defined %}{{ last_updated | date(format="%+") }}{% endif %} + {{ feed_url | safe }} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ page.updated | default(value=page.date) | date(format="%+") }} + {% for author in page.authors %} + + + {{ author }} + + + {% else %} + + + {%- if config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + + {% endfor %} + + {{ page.permalink | safe }} + {% if page.summary %} + {{ page.summary }} + {% else %} + + {{ page.content }} + + {% endif %} + + {%- endfor %} + diff --git a/templates_gmi/base.html b/templates_gmi/base.html new file mode 100644 index 0000000..3c9447f --- /dev/null +++ b/templates_gmi/base.html @@ -0,0 +1,11 @@ +# Jan Tuomi + +=> /posts posts +=> /linklog linklog +=> /now now +=> /projects projects +{% block content %}{% endblock %} + +> Jan Tuomi. Minimalist, digital gardener, senior software engineer. Finland. + +=> https://github.com/jantuomi GitHub diff --git a/templates_gmi/index.html b/templates_gmi/index.html new file mode 100644 index 0000000..b9bca7e --- /dev/null +++ b/templates_gmi/index.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% block content %} + +Hi! My name is Jan. I am a senior software engineer based in Finland. Welcome to my personal blog and digital garden¹. + +=> /files/Jan_Tuomi_headshot_220.jpg My portrait + +I like keeping things simple and pragmatic. I'm a life-long learner, but I don't go chasing trends. +I enjoy spending time with my fiancée and our dog, tinkering with computer hardware and software, games of all kinds but mostly video-, tabletop and role-playing, electronics, music, language learning and linguistics. +I created this site² as a creative outlet for expressing myself and sharing my experiences. + +{% set posts = get_section(path="posts/_index.md") %} + +## Latest posts + +{% for page in posts.pages | slice(end=3) %} +=> {{ page.path }} {{ page.title }} ({{ page.date | date(format="%Y-%m-%d") }}) +{% endfor %} + +The posts page is a listing of my posts. I post sporadically about various subjects and with varying levels of effort. +The linklog page contains a curated aggregation of bookmarks, saved blog posts and essays, books, series, papers or anything else that I feel like sharing or recommending, stored in Linkhut. +On the *now* page I write what's currently going on in my life. Stuff that some would write onto their social media page. +The *projects* page contains info about my hobby projects. + +=> https://ln.ht/~jant My Linkhut page + +## Contact + +Email (jan *at* jantuomi *dot* fi) +=> https://fi.linkedin.com/in/jantuomi LinkedIn (jantuomi) +=> https://dice.camp/@kal_jan Mastodon (dice.camp/@kal_jan) +=> https://kal-jan.itch.io/ itch.io (kal_jan) +=> https://github.com/jantuomi Github (jantuomi) + +## Webrings + +=> https://xn--sr8hvo.ws/previous IndieWeb Webring (← previous) +=> https://xn--sr8hvo.ws/next IndieWeb Webring (→ next) +=> https://fediring.net/previous?host=jan.systems Fediring (← previous) +=> https://fediring.net/next?host=jan.systems Fediring (→ next) + +[1] The phrase "digital garden" is a metaphor for thinking about writing and creating that focuses less on the resulting "showpiece" and more on the process, care, and craft it takes to get there. — Joel Hooks + +=> https://joelhooks.com/digital-garden/ Joel Hooks + +[2] This site is written using the Zola static site generator. At first, the site was automatically deployed after every Markdown edit, but nowadays I use a more traditional manual deploy mechanism. + +=> https://www.getzola.org Zola +=> /posts/deploying-the-garden Original Markdown edit based deployment + +{% endblock %} 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) }} + +{{ page.content | replace(from="", to=macros::toc(page=page)) | safe }} + +{% endmacro %} diff --git a/templates_gmi/now.html b/templates_gmi/now.html new file mode 100644 index 0000000..3062054 --- /dev/null +++ b/templates_gmi/now.html @@ -0,0 +1,10 @@ +{% 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 %} + +{{ macros::page_content(page=latest_now) }} + +{% endblock %} diff --git a/templates_gmi/page.html b/templates_gmi/page.html new file mode 100644 index 0000000..2676372 --- /dev/null +++ b/templates_gmi/page.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} +{% block content %} +{{ macros::page_content(page=page) }} + +{% if page.higher %} +=> {{ page.higher.path }} ← {{ page.higher.title }} +{% endif %}{% if page.lower %} +=> {{ page.lower.path }} {{ page.lower.title }} → +{% endif %} +{% endblock content %} diff --git a/templates_gmi/page_linklog.html b/templates_gmi/page_linklog.html new file mode 100644 index 0000000..14602d6 --- /dev/null +++ b/templates_gmi/page_linklog.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} +{% block content %} + +{{ page.content | replace(from="", to=macros::linklog(page=page)) }} + +{% endblock %} diff --git a/templates_gmi/section_posts.html b/templates_gmi/section_posts.html new file mode 100644 index 0000000..4d2cb55 --- /dev/null +++ b/templates_gmi/section_posts.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +{% set posts = get_section(path="posts/_index.md") %} +## {{ section.title }} + +=> /atom.xml Follow via Atom/RSS +=> https://aboutfeeds.com/ Huh? + +{% for page in posts.pages %} +=> {{ page.path }} {{ page.title }} ({{ page.date | date(format="%Y-%m-%d") }}) +{% endfor %} {% endblock %} diff --git a/templates_gmi/section_projects.html b/templates_gmi/section_projects.html new file mode 100644 index 0000000..be0db07 --- /dev/null +++ b/templates_gmi/section_projects.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +{{ section.content | safe }} +{% endblock %} diff --git a/templates_gmi/shortcodes/fig.html b/templates_gmi/shortcodes/fig.html new file mode 100644 index 0000000..9988107 --- /dev/null +++ b/templates_gmi/shortcodes/fig.html @@ -0,0 +1 @@ +=> {{ src }} {{ alt }} diff --git a/templates_gmi/shortcodes/linklog.html b/templates_gmi/shortcodes/linklog.html new file mode 100644 index 0000000..6f46a2b --- /dev/null +++ b/templates_gmi/shortcodes/linklog.html @@ -0,0 +1 @@ + diff --git a/templates_gmi/shortcodes/toc.html b/templates_gmi/shortcodes/toc.html new file mode 100644 index 0000000..479abec --- /dev/null +++ b/templates_gmi/shortcodes/toc.html @@ -0,0 +1 @@ + diff --git a/templates_html/atom.xml b/templates_html/atom.xml new file mode 100644 index 0000000..b1721ce --- /dev/null +++ b/templates_html/atom.xml @@ -0,0 +1,68 @@ + + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + {%- if config.description %} + {{ config.description }} + {%- endif %} + + + Zola + {% if last_updated is defined %}{{ last_updated | date(format="%+") }}{% endif %} + {{ feed_url | safe }} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%+") }} + {{ page.updated | default(value=page.date) | date(format="%+") }} + {% for author in page.authors %} + + + {{ author }} + + + {% else %} + + + {%- if config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + + {% endfor %} + + {{ page.permalink | safe }} + {% if page.summary %} + {{ page.summary }} + {% else %} + + {{ page.content }} + + {% endif %} + + {%- endfor %} + diff --git a/templates_html/base.html b/templates_html/base.html new file mode 100644 index 0000000..82f185e --- /dev/null +++ b/templates_html/base.html @@ -0,0 +1,171 @@ + + + + + + + + + + {% if page.date %} + + {% endif %} + + {% if page.extra.keywords %} + + {% endif %} + + {% block title %} + {% if page.title %} + {{ page.title }} — {{ config.title }} + {% elif section.title %} + {{ section.title }} — {{ config.title }} + {% else %} + {{ config.title }} + {% endif %} + {% endblock %} + + {% block description %} + {% if page.description %} + + {% elif page.summary %} + + {% else %} + + {% endif %} + {% endblock %} + + + + + + + + + +
+ Jan Tuomi +
+
+ + +
{% block content %}{% endblock %}
+ + + + + + diff --git a/templates_html/index.html b/templates_html/index.html new file mode 100644 index 0000000..31d0a90 --- /dev/null +++ b/templates_html/index.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} +{% block content %} + +


+ + Hi! My name is Jan. I am a senior software engineer based in Finland. Welcome to my personal blog and digital garden¹. +

+

I like keeping things simple and pragmatic. I'm a life-long learner, but I don't go chasing trends.

+

I enjoy spending time with my fiancée and our dog, tinkering with computer hardware and software, games of all kinds but mostly video-, tabletop and role-playing, electronics, music, language learning and linguistics.

+

I created this site² as a creative outlet for expressing myself and sharing my experiences.

+ +{% set posts = get_section(path="posts/_index.md") %} +
+

Latest posts

+
    +{% for page in posts.pages | slice(end=3) %} +
  • + {{ page.title }} + ({{ page.date | date(format="%Y-%m-%d") }}) +
  • +{% endfor %} +
+ +

The posts page is a listing of my posts. I post sporadically about various subjects and with varying levels of effort.

+

The linklog page contains a curated aggregation of bookmarks, saved blog posts and essays, books, series, papers or anything else that I feel like sharing or recommending, stored in Linkhut.

+

On the now page I write what's currently going on in my life. Stuff that some would write onto their social media page.

+

The projects page contains info about my hobby projects.

+ +
+
+

Contact

+ +
+
+

Webrings

+ +An IndieWeb Webring 💍 + +
+ +Fediring + + +
+
+ +
+ +

+[1] The phrase "digital garden" is a metaphor for thinking about writing and creating that focuses less on the resulting "showpiece" and more on the process, care, and craft it takes to get there. — Joel Hooks +

+ +

+[2] This site is written using the Zola static site generator. At first, the site was automatically deployed after every Markdown edit, but nowadays I use a more traditional manual deploy mechanism. +

+ + +{% endblock %} diff --git a/templates_html/macros.html b/templates_html/macros.html new file mode 100644 index 0000000..3922659 --- /dev/null +++ b/templates_html/macros.html @@ -0,0 +1,45 @@ +{% macro toc(page) %} + +{% endmacro %} + +{% macro linklog(page) %} +{% set lh_data = load_data(path="linklog.json") %} + +{% 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) }} +{{ page.content | replace(from="", to=macros::toc(page=page)) | safe }} +{% endmacro %} diff --git a/templates_html/now.html b/templates_html/now.html new file mode 100644 index 0000000..f05b6aa --- /dev/null +++ b/templates_html/now.html @@ -0,0 +1,11 @@ +{% 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 %} + +{{ macros::page_content(page=latest_now) }} + +{% endblock %} diff --git a/templates_html/page.html b/templates_html/page.html new file mode 100644 index 0000000..61db175 --- /dev/null +++ b/templates_html/page.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% import "macros.html" as macros %} +{% block content %} + +{{ macros::page_content(page=page) }} + + + + +{% endblock %} diff --git a/templates_html/page_linklog.html b/templates_html/page_linklog.html new file mode 100644 index 0000000..e4fc945 --- /dev/null +++ b/templates_html/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_html/section_posts.html b/templates_html/section_posts.html new file mode 100644 index 0000000..f44321f --- /dev/null +++ b/templates_html/section_posts.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} +{% block content %} +{% set posts = get_section(path="posts/_index.md") %} + +

{{ section.title }}

+

+ Follow via Atom/RSS (Huh?) +

+ diff --git a/templates_html/section_projects.html b/templates_html/section_projects.html new file mode 100644 index 0000000..be0db07 --- /dev/null +++ b/templates_html/section_projects.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +{{ section.content | safe }} +{% endblock %} diff --git a/templates_html/shortcodes/fig.html b/templates_html/shortcodes/fig.html new file mode 100644 index 0000000..4ac99b4 --- /dev/null +++ b/templates_html/shortcodes/fig.html @@ -0,0 +1,4 @@ +
+ {{ alt }} + +
diff --git a/templates_html/shortcodes/linklog.html b/templates_html/shortcodes/linklog.html new file mode 100644 index 0000000..6f46a2b --- /dev/null +++ b/templates_html/shortcodes/linklog.html @@ -0,0 +1 @@ + diff --git a/templates_html/shortcodes/toc.html b/templates_html/shortcodes/toc.html new file mode 100644 index 0000000..479abec --- /dev/null +++ b/templates_html/shortcodes/toc.html @@ -0,0 +1 @@ + -- cgit v1.3