From fccd15aec3507fd3f0cb4a2c18a0ec1af1d69c1f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 4 Jul 2024 11:36:33 -0700 Subject: migrate to zola --- templates/base.html | 20 ++++++++++++++++++++ templates/blog.html | 20 ++++++++++++++++++++ templates/index.html | 38 ++++++++++++++++++++++++++++++++++++++ templates/orphan.html | 10 ++++++++++ templates/page.html | 28 ++++++++++++++++++++++++++++ templates/section.html | 16 ++++++++++++++++ 6 files changed, 132 insertions(+) create mode 100644 templates/base.html create mode 100644 templates/blog.html create mode 100644 templates/index.html create mode 100644 templates/orphan.html create mode 100644 templates/page.html create mode 100644 templates/section.html (limited to 'templates') diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..7eeeaf6 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + + {% block title %}{{- config.title -}}{% endblock title %} + + + + {% block content %}{% endblock content %} + + + diff --git a/templates/blog.html b/templates/blog.html new file mode 100644 index 0000000..0e3c2bf --- /dev/null +++ b/templates/blog.html @@ -0,0 +1,20 @@ +{% extends "section.html" %} + +{%- block content -%} +

{{ section.title }}

+{%- for year, posts in section.pages | group_by(attribute="year") -%} +
+

{{ year }}

+ + + +
+{%- endfor %} +{%- endblock content -%} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..4f848be --- /dev/null +++ b/templates/index.html @@ -0,0 +1,38 @@ +{% extends "base.html" %} + +{%- block content -%} +
+ +{% if section.content %} +
+ {{ section.content | safe }} +
+{% endif %} + +

articles

+{%- set blog = get_section(path="blog/_index.md") -%} +{%- set post_count = blog.pages | length -%} + + +

notes

+{%- set notes = get_section(path="notes/_index.md") -%} +{%- set post_count = notes.pages | length -%} + + +
+ +{%- endblock content -%} diff --git a/templates/orphan.html b/templates/orphan.html new file mode 100644 index 0000000..2469ecf --- /dev/null +++ b/templates/orphan.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} + +{% block content -%} +
+

{{- page.title -}}

+{{ page.content | safe -}} +
+{%- endblock content -%} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..1026cd0 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }} - {{ config.title }}{% endblock title %} + +{% block content -%} +
+

{{ page.title }}

+

+ + {%- if page.updated %} + • + updated + {%- endif %} +

+ +{{ page.content | safe -}} +
+ +
+

+↑ back home +

+ +{%- endblock content %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..7130c84 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,16 @@ +{% extends "orphan.html" %} + +{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %} + +{% block content %} +

{{ section.title }}

+ +{% endblock content %} -- cgit v1.2.3